Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Always pad with whitespace

  • Loading branch information...
commit 6a81c90b7946de5cea23b1563668cb7e40b310c0 1 parent eba1ad5
Tim Pope authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  plugin/commentary.vim
2  plugin/commentary.vim
View
@@ -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\@<!')
Please sign in to comment.
Something went wrong with that request. Please try again.