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. Text emphasis restriction to single-lines
15 |vim-markdown-text-emphasis-restriction-to-single-lines|
16 7. Syntax Concealing |vim-markdown-syntax-concealing|
17 8. Syntax extensions |vim-markdown-syntax-extensions|
18 1. LaTeX math |vim-markdown-latex-math|
19 2. YAML Front Matter |vim-markdown-yaml-front-matter|
20 3. TOML Front Matter |vim-markdown-toml-front-matter|
21 4. JSON Front Matter |vim-markdown-json-front-matter|
22 4. Mappings |vim-markdown-mappings|
23 5. Commands |vim-markdown-commands|
24 6. Credits |vim-markdown-credits|
25 7. License |vim-markdown-license|
26 8. References |vim-markdown-references|
28 ===============================================================================
29 *vim-markdown-introduction*
32 Syntax highlighting, matching rules and mappings for the original Markdown [1]
35 ===============================================================================
36 *vim-markdown-installation*
39 If you use Vundle [2], add the following line to your '~/.vimrc':
41 Plugin 'godlygeek/tabular'
42 Plugin 'plasticboy/vim-markdown'
44 The 'tabular' plugin must come _before_ 'vim-markdown'.
51 If you use Pathogen [3], do this:
54 git clone https://github.com/plasticboy/vim-markdown.git
56 To install without Pathogen using the Debian vim-addon-manager [4], do this:
58 git clone https://github.com/plasticboy/vim-markdown.git
61 vim-addon-manager install markdown
63 If you are not using any package manager, download the tarball [5] and do this:
66 tar --strip=1 -zxf vim-markdown-master.tar.gz
68 ===============================================================================
69 *vim-markdown-options*
72 -------------------------------------------------------------------------------
73 *vim-markdown-disable-folding*
76 Add the following line to your '.vimrc' to disable the folding configuration:
78 let g:vim_markdown_folding_disabled = 1
80 This option only controls Vim Markdown specific folding configuration.
82 To enable/disable folding use Vim's standard folding configuration.
86 -------------------------------------------------------------------------------
87 *vim-markdown-change-fold-style*
90 To fold in a style like python-mode [6], add the following to your '.vimrc':
92 let g:vim_markdown_folding_style_pythonic = 1
94 -------------------------------------------------------------------------------
95 *vim-markdown-set-header-folding-level*
96 Set header folding level ~
98 Folding level is a number between 1 and 6. By default, if not specified, it is
101 let g:vim_markdown_folding_level = 6
103 Tip: it can be changed on the fly with:
105 :let g:vim_markdown_folding_level = 1
108 -------------------------------------------------------------------------------
109 *vim-markdown-disable-default-key-mappings*
110 Disable Default Key Mappings ~
112 Add the following line to your '.vimrc' to disable default key mappings:
114 let g:vim_markdown_no_default_key_mappings = 1
116 You can also map them by yourself with '<Plug>' mappings.
118 -------------------------------------------------------------------------------
119 *vim-markdown-enable-toc-window-auto-fit*
120 Enable TOC window auto-fit ~
122 Allow for the TOC window to auto-fit when it's possible for it to shrink. It
123 never increases its default size (half screen), it only shrinks.
125 let g:vim_markdown_toc_autofit = 1
127 -------------------------------------------------------------------------------
128 *vim-markdown-text-emphasis-restriction-to-single-lines*
129 Text emphasis restriction to single-lines ~
131 By default text emphasis works across multiple lines until a closing token is
132 found. However, it's possible to restrict text emphasis to a single line (ie,
133 for it to be applied a closing token must be found on the same line). To do so:
135 let g:vim_markdown_emphasis_multiline = 0
137 -------------------------------------------------------------------------------
138 *vim-markdown-syntax-concealing*
141 Concealing is set for some syntax.
143 For example, conceal '[link text](link url)' as just 'link text'.
145 To disable conceal, add the following to your '.vimrc':
147 let g:vim_markdown_conceal = 0
149 -------------------------------------------------------------------------------
150 *vim-markdown-syntax-extensions*
153 The following options control which syntax extensions will be turned on. They
156 -------------------------------------------------------------------------------
157 *vim-markdown-latex-math*
160 Used as '$x^2$', '$$x^2$$', escapable as '\$x\$' and '\$\$x\$\$'.
162 let g:vim_markdown_math = 1
164 -------------------------------------------------------------------------------
165 *vim-markdown-yaml-front-matter*
168 Highlight YAML front matter as used by Jekyll or Hugo [7].
170 let g:vim_markdown_frontmatter = 1
172 -------------------------------------------------------------------------------
173 *vim-markdown-toml-front-matter*
176 Highlight TOML front matter as used by Hugo [7].
178 TOML syntax highlight requires vim-toml [8].
180 let g:vim_markdown_toml_frontmatter = 1
182 -------------------------------------------------------------------------------
183 *vim-markdown-json-front-matter*
186 Highlight JSON front matter as used by Hugo [7].
188 JSON syntax highlight requires vim-json [9].
190 let g:vim_markdown_json_frontmatter = 1
192 ===============================================================================
193 *vim-markdown-mappings*
196 The following work on normal and visual modes:
199 - 'gx': open the link under the cursor in the same browser as the standard
200 'gx' command. '<Plug>Markdown_OpenUrlUnderCursor'
202 The standard 'gx' is extended by allowing you to put your cursor anywhere
205 For example, all the following cursor positions will work:
207 [Example](http://example.com)
215 Known limitation: does not work for links that span multiple lines.
218 - ']]': go to next header. '<Plug>Markdown_MoveToNextHeader'
221 - '[[': go to previous header. Contrast with ']c'.
222 '<Plug>Markdown_MoveToPreviousHeader'
225 - '][': go to next sibling header if any.
226 '<Plug>Markdown_MoveToNextSiblingHeader'
229 - '[]': go to previous sibling header if any.
230 '<Plug>Markdown_MoveToPreviousSiblingHeader'
233 - ']c': go to Current header. '<Plug>Markdown_MoveToCurHeader'
236 - ']u': go to parent header (Up). '<Plug>Markdown_MoveToParentHeader'
238 This plugin follows the recommended Vim plugin mapping interface, so to change
239 the map ']u' to 'asdf', add to your '.vimrc':
241 map asdf <Plug>Markdown_MoveToParentHeader
243 To disable a map use:
245 map <Plug> <Plug>Markdown_MoveToParentHeader
247 ===============================================================================
248 *vim-markdown-commands*
251 The following requires ':filetype plugin on'.
256 Decrease level of all headers in buffer: 'h2' to 'h1', 'h3' to 'h2', etc.
258 If range is given, only operate in the range.
260 If an 'h1' would be decreased, abort.
262 For simplicity of implementation, Setex headers are converted to Atx.
265 - ':HeaderIncrease': Analogous to ':HeaderDecrease', but increase levels
271 Convert all Setex style headers in buffer to Atx.
273 If a range is given, e.g. hit ':' from visual mode, only operate on the
277 - ':TableFormat': Format the table under the cursor like this [10].
279 Requires Tabular [11].
281 The input table _must_ already have a separator line as the second line of
282 the table. That line only needs to contain the correct pipes '|', nothing
286 - ':Toc': create a quickfix vertical window navigable table of contents with
289 Hit '<Enter>' on a line to jump to the corresponding line of the markdown
293 - ':Toch': Same as ':Toc' but in an horizontal window.
296 - ':Toct': Same as ':Toc' but in a new tab.
299 - ':Tocv': Same as ':Toc' for symmetry with ':Toch' and ':Tocv'.
301 ===============================================================================
302 *vim-markdown-credits*
305 The main contributors of vim-markdown are:
307 - **Ben Williams** (A.K.A. **plasticboy**). The original developer of vim-
308 markdown. Homepage [12].
310 If you feel that your name should be on this list, please make a pull request
311 listing your contributions.
313 ===============================================================================
314 *vim-markdown-license*
317 The MIT License (MIT)
319 Copyright (c) 2012 Benjamin D. Williams
321 Permission is hereby granted, free of charge, to any person obtaining a copy of
322 this software and associated documentation files (the "Software"), to deal in
323 the Software without restriction, including without limitation the rights to
324 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
325 of the Software, and to permit persons to whom the Software is furnished to do
326 so, subject to the following conditions:
328 The above copyright notice and this permission notice shall be included in all
329 copies or substantial portions of the Software.
331 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
332 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
333 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
334 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
335 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
336 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
339 ===============================================================================
340 *vim-markdown-references*
343 [1] http://daringfireball.net/projects/markdown/
344 [2] https://github.com/gmarik/vundle
345 [3] https://github.com/tpope/vim-pathogen
346 [4] http://packages.qa.debian.org/v/vim-addon-manager.html
347 [5] https://github.com/plasticboy/vim-markdown/archive/master.tar.gz
348 [6] https://github.com/klen/python-mode
349 [7] https://gohugo.io/content/front-matter/
350 [8] https://github.com/cespare/vim-toml
351 [9] https://github.com/elzr/vim-json
352 [10] http://www.cirosantilli.com/markdown-style-guide/#tables
353 [11] https://github.com/godlygeek/tabular
354 [12] http://plasticboy.com/