One sentence per line and wrap long lines.
- Format text using
gqwithset formatexpr=sentencer#Format()or:[range]Sentencer. - Force words to appear on the same line by "binding" them with
:SentencerBind.
| Variable | Description | Default |
|---|---|---|
g:sentencer_punctuation |
The characters to recognize as sentence ending punctuation. | '.!?' |
g:sentencer_ignore |
A list of patterns that when followed by punctuation should not break the line. | ['e.g', 'Dr', ...] (full list) |
g:sentencer_textwidth |
The maximum line length before wrapping. Set to 0 to use &textwidth and -1 to disable. |
0 |
g:sentencer_overflow |
The number of allowed characters over the max length before wrapping. Or, as a float, the percent of the max length to allow before wrapping. | 0.1 |
g:sentencer_filetypes |
The filetypes to automatically set formatexpr. Use ['*'] to enable for all filetypes. |
['markdown', 'tex', 'text'] |
Line-wrapping lists is supported if the n flag is set in 'formatoptions'.
Lists are recognized using the 'formatlistpat' option.
For example, the following options recognize Markdown lists.
set formatoptions+=n
let &formatlistpat='^\s*\d\+\.\s\+\|^\s*[-*+]\s\+\|^\[^\ze[^\]]\+\]:'