Created
February 11, 2015 18:11
-
-
Save chrisbra/1832a5eece434ee1616c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugin/commentary.vim b/plugin/commentary.vim | |
index a91cd71..e364a5f 100644 | |
--- a/plugin/commentary.vim | |
+++ b/plugin/commentary.vim | |
@@ -24,6 +24,10 @@ function! s:go(type,...) abort | |
let uncomment = 2 | |
for lnum in range(lnum1,lnum2) | |
let line = matchstr(getline(lnum),'\S.*\s\@<!') | |
+ if stridx(line,l) == -1 && stridx(line,l[0:-2])==0 && line[strlen(line)-strlen(r[1:]):-1]==r[1:] | |
+ let l = l[0:-2] | |
+ let r = r[1:] | |
+ endif | |
if line != '' && (stridx(line,l) || line[strlen(line)-strlen(r) : -1] != r) | |
let uncomment = 0 | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment