back to home

preservim / vim-markdown

Markdown Vim Mode

4,807 stars
520 forks
274 issues
Vim ScriptMakefileJust

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing preservim/vim-markdown in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/preservim/vim-markdown)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Vim Markdown Syntax highlighting, matching rules and mappings for the original Markdown and extensions. • Installation • Basic usage • Options • Mappings • Commands • Credits • License Installation If you use Vundle, add the following lines to your : The plugin must come *before* . Then run inside Vim: If you use Pathogen, do this: To install without Pathogen using the Debian vim-addon-manager, do this: If you are using a package manager with semver support (like lazy.nvim) make sure you are following the master branch (see https://github.com/preservim/vim-markdown/issues/616). If you are not using any package manager, download the tarball and do this: Basic usage Folding Folding is enabled for headers by default. The following commands are useful to open and close folds: • : reduces fold level throughout the buffer • : opens all folds • : increases fold level throughout the buffer • : folds everything all the way • : toggle a fold your cursor is on • : toggle a fold your cursor is on recursively • : open a fold your cursor is on • : open a fold your cursor is on recursively • : close a fold your cursor is on • : close a fold your cursor is on recursively Options are available to disable folding or change folding style. Try and for details. Concealing Concealing is set for some syntax such as bold, italic, code block and link. Concealing lets you conceal text with other text. The actual source text is not modified. If you put your cursor on the concealed line, the conceal goes away. Options are available to disable or change concealing. Try and for details. Options Disable Folding • Add the following line to your to disable the folding configuration: let g:vim_markdown_folding_disabled = 1 This option only controls Vim Markdown specific folding configuration. To enable/disable folding use Vim's standard folding configuration. set [no]foldenable Change fold style • To fold in a style like python-mode, add the following to your : let g:vim_markdown_folding_style_pythonic = 1 setting (default 1) is set to . Thus level 1 heading which is served as a document title is expanded by default. • To prevent foldtext from being set add the following to your : let g:vim_markdown_override_foldtext = 0 Set header folding level • Folding level is a number between 1 and 6. By default, if not specified, it is set to 1. let g:vim_markdown_folding_level = 6 Tip: it can be changed on the fly with: :let g:vim_markdown_folding_level = 1 :edit Disable Default Key Mappings • Add the following line to your to disable default key mappings: let g:vim_markdown_no_default_key_mappings = 1 You can also map them by yourself with mappings. Enable TOC window auto-fit • Allow for the TOC window to auto-fit when it's possible for it to shrink. It never increases its default size (half screen), it only shrinks. let g:vim_markdown_toc_autofit = 1 Text emphasis restriction to single-lines • By default text emphasis works across multiple lines until a closing token is found. However, it's possible to restrict text emphasis to a single line (i.e., for it to be applied a closing token must be found on the same line). To do so: let g:vim_markdown_emphasis_multiline = 0 Syntax Concealing • Concealing is set for some syntax. For example, conceal as just . Also, and will conceal to just _italic_. Similarly , , , and will conceal to just __bold__, **bold**, ___italic bold___, and ***italic bold*** respectively. To enable conceal use Vim's standard conceal configuration. set conceallevel=2 To disable conceal regardless of setting, add the following to your : let g:vim_markdown_conceal = 0 To disable math conceal with LaTeX math syntax enabled, add the following to your : let g:tex_conceal = "" let g:vim_markdown_math = 1 • Disabling conceal for code fences requires an additional setting: let g:vim_markdown_conceal_code_blocks = 0 Fenced code block languages • You can use filetype name as fenced code block languages for syntax highlighting. If you want to use different name from filetype, you can add it in your like so: let g:vim_markdown_fenced_languages = ['csharp=cs'] This will cause the following to be highlighted using the filetype syntax. Default is . Follow named anchors • This feature allows the command to follow named anchors in links of the form or just , where file may omit the extension as usual. Two variables control its operation: let g:vim_markdown_follow_anchor = 1 This tells vim-markdown whether to attempt to follow a named anchor in a link or not. When it is 1, and only if a link can be split in two parts by the pattern '#', then the first part is interpreted as the file and the second one as the named anchor. This also includes urls of the form , for which the first part is considered empty, meaning that the target file is the current one. After the file is opened, the anchor will be searched. Default is . • let g:vim_markdown_anchorexpr = "' >'" This expression will be evaluated substituting with a quoted string that contains the anchor to visit. The result of the evaluation will become the real anchor to search in the target file. This is useful in order to convert anchors of the form, say, to searches of the form or . Default is . Syntax extensions The following options control which syntax extensions will be turned on. They are off by default. LaTeX math • Used as , , escapable as and . let g:vim_markdown_math = 1 YAML Front Matter • Highlight YAML front matter as used by Jekyll or Hugo. let g:vim_markdown_frontmatter = 1 TOML Front Matter • Highlight TOML front matter as used by Hugo. let g:vim_markdown_toml_frontmatter = 1 JSON Front Matter • Highlight JSON front matter as used by Hugo. let g:vim_markdown_json_frontmatter = 1 Strikethrough • Strikethrough uses two tildes. let g:vim_markdown_strikethrough = 1 Adjust new list item indent • You can adjust a new list indent. For example, you…