Skip to content

Commit 6e10a5e

Browse files
committed
Updated README
1 parent 8b746ef commit 6e10a5e

File tree

2 files changed

+43
-14
lines changed

2 files changed

+43
-14
lines changed

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Along the same line, to enable the formatting feature, you need to install
2929

3030
# Usage
3131

32-
To best way to describe how to operate it, let's go through some examples.
32+
The best way to describe how to operate this plug it's through examples,
33+
so let's show some.
3334

3435
### Text-styles
3536

@@ -41,6 +42,9 @@ to remove it.
4142

4243
Next, try to do the same with arbitrary text-objects or in Visual mode by
4344
replacing `b` with `i` for italics, `s` for strike-through, `c` for code, etc.
45+
For example, you can use `<localleader>sa(` for strike-through all the text
46+
delimited by parenthesis (provided that the cursor is located in a region
47+
delimited by parenthesis).
4448

4549
You can also highlight text with `<localleader>h`. However, the highlight is
4650
not persistent. As usual, you can remove the highlight with `<localleader>d`.
@@ -62,7 +66,8 @@ locate their position in the current buffer. When on a link text, hit
6266
`<localleader>d` to remove the link.
6367

6468
Although you can hit `<enter>` to link a word, more generlly you can
65-
use `<localleader>l` plus some motion to create links.
69+
use `<localleader>l` plus some motion to create links, like for example
70+
`<localleader>lfa` (note that `fa` is a motion).
6671

6772
You can also dynamically refer to links while typing. Go in insert mode and
6873
type `[` to see a list of all available links.
@@ -81,17 +86,22 @@ comment line. The reference identifiers are numbers.
8186
8287
### Lists
8388

84-
You can create lists or enumerations as usual. However, the behavior of the
85-
`<enter>` key is hacked to mimic the behavior of Microsoft products and
86-
respect possible nesting. Although there are many reasons to stick with the
89+
You can create lists as in a normal markdown file. However, note that the
90+
behavior of the `<enter>` key is hacked to mimic the behavior of Microsoft
91+
products and respect possible nesting.
92+
Although there are many reasons to stick with the
8793
bundled [vim-markdown][3] behavior when it comes to lists,
8894
my use-cases and preferences require a different behavior.
89-
If you want the normal behavior, then set
95+
If you want the standard [vim-markdown][3] behavior, then set
9096
`g:markdown_extras_config['hack_CR'] = false` in your `.vimrc`.
9197

9298
You can create to-do lists as you would do in normal markdown, by starting
9399
lines with `- [ ]` . When in normal mode, you can check/uncheck the item in the
94-
to-do list with `<localleader>x` in normal mode.
100+
to-do list with `<localleader>x` in normal mode. You can change how check-boxes
101+
are rendered by setting the keys `empty_checkbox` and `marked_checkbox` of the
102+
`g:markdown_extras_config` dictionary, for example you can set
103+
`g:markdown_extras_config[marked_checkbox] = 0x2714`. The value shall be a
104+
utf-8 value.
95105

96106
> [!Note]
97107
>
@@ -151,8 +161,8 @@ limitations:
151161
fail. Parsing non-regular languages requires more advanced tools like
152162
Tree-sitter. However, it is generally not a good idea to "punish" all use
153163
cases with slow and memory-hungry solutions just for a few edge cases that
154-
likely occur very sporadically. I prefer efficiency and speed for most use
155-
cases, and for the others... well, patience!
164+
likely occur very sporadically. The choice is to favor efficiency and speed
165+
for most use cases, rather than having as much coverage as possible.
156166

157167
- The plugin somewhat forces the use of reference-style links where the
158168
reference identifier is a number. You could try using strings as reference

doc/markdown_extras.txt

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ Then, while letting the cursor on the bold text, hit `<localleader>d`
5757
to remove it.
5858

5959
Next, try to do the same with arbitrary motion or with some visual selections.
60+
For example, you can use `<localleader>sa(` for strike-through all the text
61+
delimited by parenthesis (provided that the cursor is located in a region
62+
delimited by parenthesis).
63+
6064
See |markdown-extras-mappings| for all the possible text styles.
6165

6266
LINKS
@@ -72,8 +76,9 @@ Next, create some new links and use `<localleader>n` and `<localleader>N` to
7276
locate their position in the current buffer. When on a link, hit
7377
`<localleader>d` to remove it.
7478

75-
Note: Although you can hit |<enter>| to link a word, more generlly you can
76-
use `<localleader>l` plus some motion to create links.
79+
Note: Although you can hit `<enter>` to link a word, more generlly you can
80+
use `<localleader>l` plus some motion to create links, like for example
81+
`<localleader>lfa` (note that `fa` is a motion).
7782

7883
You can also dynamically refer to links while typing. Go in insert mode and
7984
type `[` to see a list of all available links.
@@ -95,9 +100,23 @@ bundled |ft-markdown-plugin| behavior when it comes to lists,
95100
my use-cases and preferences require a different behavior. At the end Vim is a
96101
matter of customizing everything to your workflow, no? :)
97102

103+
You can create lists as in a normal markdown file. However, note that the
104+
behavior of the |<enter>| key is hacked to mimic the behavior of Microsoft
105+
products and respect possible nesting.
106+
Although there are many reasons to stick with the
107+
bundled |ft-markdown-plugin| behavior when it comes to lists,
108+
my use-cases and preferences require a different behavior.
109+
If you want the standard |ft-markdown-plugin| behavior, then set
110+
`g:markdown_extras_config['hack_CR'] = false` in your `.vimrc`.
111+
98112
You can create to-do lists as you would do in normal markdown, by starting
99113
lines with `- [ ]` . When in normal mode, you can check/uncheck the item in the
100-
to-do list with `<localleader>x`.
114+
to-do list with `<localleader>x`. You can change how check-boxes
115+
are rendered by setting the keys `empty_checkbox` and `marked_checkbox` of the
116+
`g:markdown_extras_config` dictionary, for example you can set
117+
`g:markdown_extras_config[marked_checkbox] = 0x2714`.
118+
The value shall be a utf-8 value.
119+
101120

102121
Note: If you have `vim-outline` installed, then you can use `<localleader>o` to
103122
display the unchecked items of the to-do list in a scratch buffer.
@@ -266,8 +285,8 @@ limitations:
266285
fail. Parsing non-regular languages requires more advanced tools like
267286
Tree-sitter. However, it is generally not a good idea to "punish" all use
268287
cases with slow and memory-hungry solutions just for a few edge cases that
269-
likely occur very sporadically. I prefer efficiency and speed for most use
270-
cases, and for the others... well, patience!
288+
likely occur very sporadically. The choice is to favor efficiency and speed
289+
for most use cases, rather than having as much coverage as possible.
271290

272291
- The plugin somewhat forces the use of reference-style links where the
273292
reference identifier is a number. You could try using strings as reference

0 commit comments

Comments
 (0)