@@ -115,14 +115,41 @@ key mappings via your `.vimrc`:
115
115
let g:textobj#sentence#move_n = ')'
116
116
```
117
117
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
+
118
145
## See also
119
146
120
147
If you find this plugin useful, check out these others by [ @reedes ] [ re ] :
121
148
122
149
* [ vim-colors-pencil] [ cp ] - color scheme for Vim inspired by IA Writer
123
150
* [ vim-lexical] [ lx ] - building on Vim’s spell-check and thesaurus/dictionary completion
124
151
* [ 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
126
153
* [ vim-pencil] [ pn ] - rethinking Vim as a tool for writers
127
154
* [ vim-textobj-quote] [ qu ] - extends Vim to support typographic (‘curly’) quotes
128
155
* [ 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]:
146
173
147
174
If you’ve spotted a problem or have an idea on improving this plugin,
148
175
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
150
177
welcome too.
151
178
152
179
<!-- vim: set tw=74 :-->
0 commit comments