Make 'insert new command' work also after non-^ and non-\s regex (#596)
The insert new command functionality, mapped on `<F7>` by default, doesn't work when the word is preceded by non-space and non-start-of-line character. This commit allows insertion after any non-letter, since LaTeX commands cannot contain other charaters than [a-zA-Z].
This commit is contained in:
parent
c72fcbc0df
commit
c68f5ca7c3
@ -105,7 +105,7 @@ function! vimtex#cmd#delete() " {{{1
|
||||
endfunction
|
||||
|
||||
function! vimtex#cmd#create() " {{{1
|
||||
let l:re = '\v%(^|\s)\zs\w+\ze%(\s|$)'
|
||||
let l:re = '\v%(^|\A)\zs\w+\ze%(\s|$)'
|
||||
let l:c0 = col('.') - (mode() ==# 'i')
|
||||
|
||||
let [l:l1, l:c1] = searchpos(l:re, 'bcn', line('.'))
|
||||
|
Loading…
Reference in New Issue
Block a user