Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Always pad with whitespace

  • Loading branch information...
commit 6a81c90b7946de5cea23b1563668cb7e40b310c0 1 parent eba1ad5
Tim Pope authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  plugin/commentary.vim
2  plugin/commentary.vim
@@ -17,7 +17,7 @@ function! s:go(type) abort
17 17 let [lnum1, lnum2] = [line("'["), line("']")]
18 18 endif
19 19
20   - let [before, after] = split(&commentstring,"%s",1)
  20 + let [before, after] = split(substitute(substitute(&commentstring,'\S\zs%s',' %s',''),'%s\ze\S','%s ',''),'%s',1)
21 21 let uncomment = 1
22 22 for lnum in range(lnum1,lnum2)
23 23 let line = matchstr(getline(lnum),'\S.*\s\@<!')

0 comments on commit 6a81c90

Please sign in to comment.
Something went wrong with that request. Please try again.