We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e5d04d commit f8238d7Copy full SHA for f8238d7
plugin/commentary.vim
@@ -54,7 +54,7 @@ function! s:go(...) abort
54
let line = getline(lnum)
55
if strlen(r) > 2 && l.r !~# '\\'
56
let line = substitute(line,
57
- \'\M'.r[0:-2].'\zs\d\*\ze'.r[-1:-1].'\|'.l[0].'\zs\d\*\ze'.l[1:-1],
+ \'\M' . substitute(l, '\ze\S\s*$', '\\zs\\d\\*\\ze', '') . '\|' . substitute(r, '\S\zs', '\\zs\\d\\*\\ze', ''),
58
\'\=substitute(submatch(0)+1-uncomment,"^0$\\|^-\\d*$","","")','g')
59
endif
60
if uncomment
0 commit comments