All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 *vim-markdown* Vim Markdown
3 ===============================================================================
6 1. Introduction |vim-markdown-introduction|
7 2. Installation |vim-markdown-installation|
8 3. Options |vim-markdown-options|
9 1. Disable Folding |vim-markdown-disable-folding|
10 2. Change fold style |vim-markdown-change-fold-style|
11 3. Set header folding level |vim-markdown-set-header-folding-level|
12 4. Disable Default Key Mappings |vim-markdown-disable-default-key-mappings|
13 5. Enable TOC window auto-fit |vim-markdown-enable-toc-window-auto-fit|
14 6. Syntax Concealing |vim-markdown-syntax-concealing|
15 7. Syntax extensions |vim-markdown-syntax-extensions|
16 1. LaTeX math |vim-markdown-latex-math|
17 2. YAML Front Matter |vim-markdown-yaml-front-matter|
18 3. TOML Front Matter |vim-markdown-toml-front-matter|
19 4. JSON Front Matter |vim-markdown-json-front-matter|
20 4. Mappings |vim-markdown-mappings|
21 5. Commands |vim-markdown-commands|
22 6. Credits |vim-markdown-credits|
23 7. License |vim-markdown-license|
24 8. References |vim-markdown-references|
26 ===============================================================================
27 *vim-markdown-introduction*
30 Syntax highlighting, matching rules and mappings for the original Markdown [1]
33 ===============================================================================
34 *vim-markdown-installation*
37 If you use Vundle [2], add the following line to your '~/.vimrc':
39 Plugin 'godlygeek/tabular'
40 Plugin 'plasticboy/vim-markdown'
42 The 'tabular' plugin must come _before_ 'vim-markdown'.
49 If you use Pathogen [3], do this:
52 git clone https://github.com/plasticboy/vim-markdown.git
54 To install without Pathogen using the Debian vim-addon-manager [4], do this:
56 git clone https://github.com/plasticboy/vim-markdown.git
59 vim-addon-manager install markdown
61 If you are not using any package manager, download the tarball [5] and do this:
64 tar --strip=1 -zxf vim-markdown-master.tar.gz
66 ===============================================================================
67 *vim-markdown-options*
70 -------------------------------------------------------------------------------
71 *vim-markdown-disable-folding*
74 Add the following line to your '.vimrc' to disable the folding configuration:
76 let g:vim_markdown_folding_disabled = 1
78 This option only controls Vim Markdown specific folding configuration.
80 To enable/disable folding use Vim's standard folding configuration.
84 -------------------------------------------------------------------------------
85 *vim-markdown-change-fold-style*
88 To fold in a style like python-mode [6], add the following to your '.vimrc':
90 let g:vim_markdown_folding_style_pythonic = 1
92 -------------------------------------------------------------------------------
93 *vim-markdown-set-header-folding-level*
94 Set header folding level ~
96 Folding level is a number between 1 and 6. By default, if not specified, it is
99 let g:vim_markdown_folding_level = 6
101 Tip: it can be changed on the fly with:
103 :let g:vim_markdown_folding_level = 1
106 -------------------------------------------------------------------------------
107 *vim-markdown-disable-default-key-mappings*
108 Disable Default Key Mappings ~
110 Add the following line to your '.vimrc' to disable default key mappings:
112 let g:vim_markdown_no_default_key_mappings = 1
114 You can also map them by yourself with '<Plug>' mappings.
116 -------------------------------------------------------------------------------
117 *vim-markdown-enable-toc-window-auto-fit*
118 Enable TOC window auto-fit ~
120 Allow for the TOC window to auto-fit when it's possible for it to shrink. It
121 never increases its default size (half screen), it only shrinks.
123 let g:vim_markdown_toc_autofit = 1
125 -------------------------------------------------------------------------------
126 *vim-markdown-syntax-concealing*
129 Concealing is set for some syntax.
131 For example, conceal '[link text](link url)' as just 'link text'.
133 To enable/disable conceal use Vim's standard conceal configuration.
137 -------------------------------------------------------------------------------
138 *vim-markdown-syntax-extensions*
141 The following options control which syntax extensions will be turned on. They
144 -------------------------------------------------------------------------------
145 *vim-markdown-latex-math*
148 Used as '$x^2$', '$$x^2$$', escapable as '\$x\$' and '\$\$x\$\$'.
150 let g:vim_markdown_math = 1
152 -------------------------------------------------------------------------------
153 *vim-markdown-yaml-front-matter*
156 Highlight YAML front matter as used by Jekyll or Hugo [7].
158 let g:vim_markdown_frontmatter = 1
160 -------------------------------------------------------------------------------
161 *vim-markdown-toml-front-matter*
164 Highlight TOML front matter as used by Hugo [7].
166 TOML syntax highlight requires vim-toml [8].
168 let g:vim_markdown_toml_frontmatter = 1
170 -------------------------------------------------------------------------------
171 *vim-markdown-json-front-matter*
174 Highlight JSON front matter as used by Hugo [7].
176 let g:vim_markdown_json_frontmatter = 1
178 ===============================================================================
179 *vim-markdown-mappings*
182 The following work on normal and visual modes:
185 - 'gx': open the link under the cursor in the same browser as the standard
186 'gx' command. '<Plug>Markdown_OpenUrlUnderCursor'
188 The standard 'gx' is extended by allowing you to put your cursor anywhere
191 For example, all the following cursor positions will work:
193 [Example](http://example.com)
201 Known limitation: does not work for links that span multiple lines.
204 - ']]': go to next header. '<Plug>Markdown_MoveToNextHeader'
207 - '[[': go to previous header. Contrast with ']c'.
208 '<Plug>Markdown_MoveToPreviousHeader'
211 - '][': go to next sibling header if any.
212 '<Plug>Markdown_MoveToNextSiblingHeader'
215 - '[]': go to previous sibling header if any.
216 '<Plug>Markdown_MoveToPreviousSiblingHeader'
219 - ']c': go to Current header. '<Plug>Markdown_MoveToCurHeader'
222 - ']u': go to parent header (Up). '<Plug>Markdown_MoveToParentHeader'
224 This plugin follows the recommended Vim plugin mapping interface, so to change
225 the map ']u' to 'asdf', add to your '.vimrc':
227 map asdf <Plug>Markdown_MoveToParentHeader
229 To disable a map use:
231 map <Plug> <Plug>Markdown_MoveToParentHeader
233 ===============================================================================
234 *vim-markdown-commands*
237 The following requires ':filetype plugin on'.
242 Decrease level of all headers in buffer: 'h2' to 'h1', 'h3' to 'h2', etc.
244 If range is given, only operate in the range.
246 If an 'h1' would be decreased, abort.
248 For simplicity of implementation, Setex headers are converted to Atx.
251 - ':HeaderIncrease': Analogous to ':HeaderDecrease', but increase levels
257 Convert all Setex style headers in buffer to Atx.
259 If a range is given, e.g. hit ':' from visual mode, only operate on the
263 - ':TableFormat': Format the table under the cursor like this [9].
265 Requires Tabular [10].
267 The input table _must_ already have a separator line as the second line of
268 the table. That line only needs to contain the correct pipes '|', nothing
272 - ':Toc': create a quickfix vertical window navigable table of contents with
275 Hit '<Enter>' on a line to jump to the corresponding line of the markdown
279 - ':Toch': Same as ':Toc' but in an horizontal window.
282 - ':Toct': Same as ':Toc' but in a new tab.
285 - ':Tocv': Same as ':Toc' for symmetry with ':Toch' and 'Tocv'.
287 ===============================================================================
288 *vim-markdown-credits*
291 The main contributors of vim-markdown are:
293 - **Ben Williams** (A.K.A. **plasticboy**). The original developer of vim-
294 markdown. Homepage [11].
296 If you feel that your name should be on this list, please make a pull request
297 listing your contributions.
299 ===============================================================================
300 *vim-markdown-license*
303 The MIT License (MIT)
305 Copyright (c) 2012 Benjamin D. Williams
307 Permission is hereby granted, free of charge, to any person obtaining a copy of
308 this software and associated documentation files (the "Software"), to deal in
309 the Software without restriction, including without limitation the rights to
310 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
311 of the Software, and to permit persons to whom the Software is furnished to do
312 so, subject to the following conditions:
314 The above copyright notice and this permission notice shall be included in all
315 copies or substantial portions of the Software.
317 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
318 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
319 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
320 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
321 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
322 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
325 ===============================================================================
326 *vim-markdown-references*
329 [1] http://daringfireball.net/projects/markdown/
330 [2] https://github.com/gmarik/vundle
331 [3] https://github.com/tpope/vim-pathogen
332 [4] http://packages.qa.debian.org/v/vim-addon-manager.html
333 [5] https://github.com/plasticboy/vim-markdown/archive/master.tar.gz
334 [6] https://github.com/klen/python-mode
335 [7] https://gohugo.io/content/front-matter/
336 [8] https://github.com/cespare/vim-toml
337 [9] http://www.cirosantilli.com/markdown-style-guide/#tables
338 [10] https://github.com/godlygeek/tabular
339 [11] http://plasticboy.com/