mirror of
https://github.com/tpope/vim-surround.git
synced 2025-11-14 06:13:48 -05:00
Only add colon if prompt ends with word (#204)
Lets you use your own ending characters, instead of always adding ': '. Closes #203
This commit is contained in:
committed by
Tim Pope
parent
2d05440ad2
commit
e49d6c2459
@@ -92,7 +92,7 @@ function! s:process(string)
|
|||||||
let m = matchstr(a:string,nr2char(i).'.\{-\}\ze'.nr2char(i))
|
let m = matchstr(a:string,nr2char(i).'.\{-\}\ze'.nr2char(i))
|
||||||
if m != ''
|
if m != ''
|
||||||
let m = substitute(strpart(m,1),'\r.*','','')
|
let m = substitute(strpart(m,1),'\r.*','','')
|
||||||
let repl_{i} = input(substitute(m,':\s*$','','').': ')
|
let repl_{i} = input(match(m,'\w\+$') >= 0 ? m.': ' : m)
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
let s = ""
|
let s = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user