Skip to content

Commit b06897c

Browse files
committed
Updated documentation
1 parent ee626a7 commit b06897c

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

README.markdown

+29-2
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,41 @@ key mappings via your `.vimrc`:
115115
let g:textobj#sentence#move_n = ')'
116116
```
117117

118+
### Additional custom sentence terminators
119+
120+
Additional sentence terminators can be added by setting
121+
`g:re_extra_sentence_term`. For example, the following will count
122+
semicolons as sentence terminators:
123+
124+
```vim
125+
let g:re_extra_sentence_term = '|;'
126+
127+
call textobj#sentence#init()
128+
```
129+
130+
Note this variable is a regular expression, and evey entry needs to be
131+
preceeded by `|`.
132+
133+
The following can be used to count LaTeX environments as sentence
134+
terminators, which is convenient for automatic rewrapping (e.g., via
135+
`gqis`) that does not touch environments which are part of the sentence:
136+
137+
```vim
138+
let g:re_extra_sentence_term =
139+
\ '|\\begin\{[a-zA-Z]*\}' .
140+
\ '|\\end\{[a-zA-Z]*\}'
141+
142+
call textobj#sentence#init()
143+
```
144+
118145
## See also
119146

120147
If you find this plugin useful, check out these others by [@reedes][re]:
121148

122149
* [vim-colors-pencil][cp] - color scheme for Vim inspired by IA Writer
123150
* [vim-lexical][lx] - building on Vim’s spell-check and thesaurus/dictionary completion
124151
* [vim-litecorrect][lc] - lightweight auto-correction for Vim
125-
* [vim-one][vo] - make use of Vim’s _+clientserver_ capabilities
152+
* [vim-one][vo] - make use of Vim’s _+clientserver_ capabilities
126153
* [vim-pencil][pn] - rethinking Vim as a tool for writers
127154
* [vim-textobj-quote][qu] - extends Vim to support typographic (‘curly’) quotes
128155
* [vim-thematic][th] - modify Vim’s appearance to suit your task and environment
@@ -146,7 +173,7 @@ If you find this plugin useful, check out these others by [@reedes][re]:
146173

147174
If you’ve spotted a problem or have an idea on improving this plugin,
148175
please post it to the github project issue page. Pull requests that add
149-
new regression tests (even failing ones that demonstrate a bug!) are
176+
new regression tests (even failing ones that demonstrate a bug!) are
150177
welcome too.
151178

152179
<!-- vim: set tw=74 :-->

0 commit comments

Comments
 (0)