Browse files

Always pad with whitespace

  • Loading branch information...
1 parent eba1ad5 commit 6a81c90b7946de5cea23b1563668cb7e40b310c0 @tpope committed Aug 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugin/commentary.vim
View
2 plugin/commentary.vim
@@ -17,7 +17,7 @@ function! s:go(type) abort
let [lnum1, lnum2] = [line("'["), line("']")]
endif
- let [before, after] = split(&commentstring,"%s",1)
+ let [before, after] = split(substitute(substitute(&commentstring,'\S\zs%s',' %s',''),'%s\ze\S','%s ',''),'%s',1)
let uncomment = 1
for lnum in range(lnum1,lnum2)
let line = matchstr(getline(lnum),'\S.*\s\@<!')

0 comments on commit 6a81c90

Please sign in to comment.