@@ -11,9 +11,8 @@ This plugin adds some spice to the bundled [vim-markdown][3], such as:
1111
1212# Requirements
1313
14- Vim 9.1-1270 is required.
15- You must set a ` <localleader> ` key and your ` .vimrc ` file shall include the
16- following lines:
14+ Vim 9.1-1270 is required. You must set a ` <localleader> ` key and your ` .vimrc `
15+ file shall include the following lines:
1716
1817```
1918 filetype indent plugin on
@@ -29,16 +28,14 @@ Along the same line, to enable the formatting feature, you need to install
2928
3029# Usage
3130
32- The best way to describe how to operate this plug it's through examples,
33- so let's show some.
31+ The best way to describe how to operate this plugin it's through examples, so
32+ let's show some.
3433
3534### Text-styles
3635
37- Open a markdown file and place the cursor on a word.
38- Hit ` <localleader>biw ` to change the text-style inside-the-word
39- to bold (` iw ` is a text-objext).
40- Then, while letting the cursor on the bold text, hit ` <localleader>d `
41- to remove it.
36+ Open a markdown file and place the cursor on a word. Hit ` <localleader>biw ` to
37+ change the text-style inside-the-word to bold (` iw ` is a text-objext). Then,
38+ while letting the cursor on the bold text, hit ` <localleader>d ` to remove it.
4239
4340Next, try to do the same with arbitrary text-objects or in Visual mode by
4441replacing ` b ` with ` i ` for italics, ` s ` for strike-through, ` c ` for code, etc.
@@ -53,22 +50,20 @@ See `:h markdown-extras-mappings` for all the possible text styles.
5350
5451### Links
5552
56- Now, place the cursor on a word and hit ` <enter> ` .
57- Select ` Create new link ` from the popup menu and point to an existing
58- file or just type a new file name.
59- If you created a new file, fill it in with some text and save it.
60- Hit ` <backspace> ` to go back to the previous file and place the cursor to the
61- newly created link. Hit ` K ` . Then, hit ` <enter> ` again to open the link.
62- The link can also be external URL: s , e.g. ` https://example.com ` .
63- If the link is a file, then ` <shift-enter> ` open it in a vertical split
64- window.
53+ Now, place the cursor on a word and hit ` <enter> ` . Select ` Create new link `
54+ from the popup menu and point to an existing file or just type a new file
55+ name. If you created a new file, fill it in with some text and save it. Hit
56+ ` <backspace> ` to go back to the previous file and place the cursor to the
57+ newly created link. Hit ` K ` . Then, hit ` <enter> ` again to open the link. The
58+ link can also be external URL: s , e.g. ` https://example.com ` . If the link is a
59+ file, then ` <shift-enter> ` open it in a vertical split window.
6560
6661Next, create some new links and use ` <localleader>n ` and ` <localleader>N ` to
6762locate their position in the current buffer. When on a link text, hit
6863` <localleader>d ` to remove the link.
6964
70- Although you can hit ` <enter> ` to link a word, more generally you can
71- use ` <localleader>l ` plus some motion to create links, like for example
65+ Although you can hit ` <enter> ` to link a word, more generally you can use
66+ ` <localleader>l ` plus some motion to create links, like for example
7267` <localleader>lfa ` (note that ` fa ` is a motion).
7368
7469You can also dynamically refer to links while typing by setting the ` omnifunc `
@@ -94,27 +89,26 @@ comment line. The reference identifiers are numbers.
9489> [ !Note]
9590>
9691> The links management only applies to links reported after the
97- > ` <!-- DO NOT REMOVE vim-markdown-extras references DO NOT REMOVE--> `
98- > comment line. Such a line shall be unique in the buffer.
92+ > ` <!-- DO NOT REMOVE vim-markdown-extras references DO NOT REMOVE--> ` comment
93+ > line. Such a line shall be unique in the buffer.
9994
10095### Lists
10196
10297You can create lists as in a normal markdown file. However, note that the
10398behavior of the ` <enter> ` key is hacked to mimic the behavior of Microsoft
104- products and respect possible nesting.
105- Although there are many reasons to stick with the
106- bundled [ vim-markdown] [ 3 ] behavior when it comes to lists,
107- my use-cases and preferences require a different behavior.
108- If you want the standard [ vim-markdown] [ 3 ] behavior, then set
99+ products and respect possible nesting. Although there are many reasons to
100+ stick with the bundled [ vim-markdown] [ 3 ] behavior when it comes to lists, my
101+ use-cases and preferences require a different behavior. If you want the
102+ standard [ vim-markdown] [ 3 ] behavior, then set
109103` g:markdown_extras_config['hack_CR'] = false ` in your ` .vimrc ` .
110104
111105You can create to-do lists as you would do in normal markdown, by starting
112- lines with ` - [ ] ` . When in normal mode, you can check/uncheck the item in the
113- to-do list with ` <localleader>x ` in normal mode. You can change how check-boxes
114- are rendered by setting the keys ` empty_checkbox ` and ` marked_checkbox ` of the
115- ` g:markdown_extras_config ` dictionary, for example you can set
116- ` g:markdown_extras_config[marked_checkbox] = 0x2714 ` . The value shall be a
117- valid Unicode point value.
106+ lines with ` - [ ] ` . When in normal mode, you can check/uncheck the item in
107+ the to-do list with ` <localleader>x ` in normal mode. You can change how
108+ check-boxes are rendered by setting the keys ` empty_checkbox ` and
109+ ` marked_checkbox ` of the ` g:markdown_extras_config ` dictionary, for example
110+ you can set ` g:markdown_extras_config[marked_checkbox] = 0x2714 ` . The value
111+ shall be a valid Unicode point value.
118112
119113> [ !Note]
120114>
@@ -123,12 +117,12 @@ valid Unicode point value.
123117
124118### Formatting
125119
126- You can format text as usual by using ` gq ` .
127- Here ` gq ` uses ` prettier ` , provided that you have it installed.
128- That is, if you use ` gq ` plus motion, or if you visually select some text and
129- then hit ` gq ` , then ` prettier ` will only prettify such a portion of text. You
130- can also prettify the whole buffer on save by setting
131- ` g:markdown_extras_config['format_on_save'] = true ` in your ` .vimrc ` .
120+ You can format text as usual by using ` gq ` . Here ` gq ` uses ` prettier ` ,
121+ provided that you have it installed. That is, if you use ` gq ` plus motion, or
122+ if you visually select some text and then hit ` gq ` , then ` prettier ` will only
123+ prettify such a portion of text. You can also prettify the whole buffer on
124+ save by setting ` g:markdown_extras_config['format_on_save'] = true ` in your
125+ ` .vimrc ` .
132126
133127### Rendering
134128
@@ -137,11 +131,11 @@ you have `pandoc` installed.
137131
138132However, sometimes you want to render & open the rendered file at once, and
139133for this reason you have ` :MDEMake ` . Try to run call such a command and hit
140- ` <tab> ` to see possible targets.
134+ ` <tab> ` to see possible targets.
141135
142- You can pass arguments to ` pandoc ` via the key
143- ` pandoc_args ` of the ` g:markdown_extras_config ` dictionary.
144- You could for example set the following:
136+ You can pass arguments to ` pandoc ` via the key ` pandoc_args ` of the
137+ ` g:markdown_extras_config ` dictionary. You could for example set the
138+ following:
145139
146140```
147141 g:markdown_extras_config = {}
@@ -152,17 +146,19 @@ You could for example set the following:
152146
153147> [ !Note]
154148>
155- > The rendered file will automatically open if your Vim has the ` :Open ` command.
149+ > The rendered file will automatically open if your Vim has the ` :Open `
150+ > command.
156151
157152### Indices
158153
159154As the plugin can be used for note-taking, it may be desirable to access
160155different indices in an ergonomic way. This can be achieved with the
161156` g:markdown_extras_indices ` list in combination with the ` :MDEIndices `
162- command. Note that ` g:markdown_extras_indices ` is nothing, but a list of files.
157+ command. Note that ` g:markdown_extras_indices ` is nothing, but a list of
158+ files.
163159
164- For more information about key-bindings, configuration, etc. take
165- a look at ` :h markdown-extras ` .
160+ For more information about key-bindings, configuration, etc. take a look at
161+ ` :h markdown-extras ` .
166162
167163### Limitations
168164
0 commit comments