Skip to content

Commit 96c7508

Browse files
author
Sebastian Koenig
committed
Allow users to specify additional sentence terminators
1 parent a7b58aa commit 96c7508

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/textobj/sentence.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ function! textobj#sentence#select_i()
3535
return s:select(b:textobj_sentence_re_i)
3636
endfunction
3737

38+
let g:re_term_user = ''
39+
3840
function! textobj#sentence#init(...)
3941
let l:args = a:0 ? a:1 : {}
4042

@@ -87,7 +89,9 @@ function! textobj#sentence#init(...)
8789

8890
" matching against end of sentence, '!', '?', and non-abbrev '.'
8991
let l:re_term =
90-
\ '([!?]|(' .
92+
\ '([!?]' .
93+
\ g:re_term_user .
94+
\ '|(' .
9195
\ l:re_abbrev_neg_lookback .
9296
\ '\.))+[' .
9397
\ l:trailing .

0 commit comments

Comments
 (0)