Skip to content

Commit

Permalink
Only add colon if prompt ends with word (#204)
Browse files Browse the repository at this point in the history
Lets you use your own ending characters, instead of always adding ': '.

Closes #203
  • Loading branch information
adriaanzon authored and tpope committed Jun 1, 2016
1 parent 2d05440 commit e49d6c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/surround.vim
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function! s:process(string)
let m = matchstr(a:string,nr2char(i).'.\{-\}\ze'.nr2char(i))
if m != ''
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
endfor
let s = ""
Expand Down

0 comments on commit e49d6c2

Please sign in to comment.