Skip to content

Commit

Permalink
Allow users to specify additional sentence terminators
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Koenig committed Aug 24, 2020
1 parent a7b58aa commit 96c7508
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autoload/textobj/sentence.vim
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ function! textobj#sentence#select_i()
return s:select(b:textobj_sentence_re_i)
endfunction

let g:re_term_user = ''

function! textobj#sentence#init(...)
let l:args = a:0 ? a:1 : {}

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

" matching against end of sentence, '!', '?', and non-abbrev '.'
let l:re_term =
\ '([!?]|(' .
\ '([!?]' .
\ g:re_term_user .
\ '|(' .
\ l:re_abbrev_neg_lookback .
\ '\.))+[' .
\ l:trailing .
Expand Down

0 comments on commit 96c7508

Please sign in to comment.