1
0
mirror of https://github.com/amix/vimrc synced 2025-06-23 06:35:01 +08:00

Updated plugins

This commit is contained in:
Amir Salihefendic
2019-11-16 16:28:42 +01:00
parent 96e10ed101
commit 72bdaba47e
204 changed files with 5936 additions and 1666 deletions

View File

@ -0,0 +1,2 @@
github: tpope
custom: ["https://www.paypal.me/vimpope"]

View File

@ -6,6 +6,9 @@ License: Same terms as Vim itself (see |license|)
Comment stuff out. Then uncomment it later. Relies on 'commentstring' to be
correctly set, or uses b:commentary_format if it is set.
Assign b:commentary_startofline to insert comment characters at column 1
regardless of indentation.
*gc*
gc{motion} Comment or uncomment lines that {motion} moves over.

View File

@ -44,6 +44,12 @@ function! s:go(...) abort
endif
endfor
if get(b:, 'commentary_startofline')
let indent = '^'
else
let indent = '^\s*'
endif
for lnum in range(lnum1,lnum2)
let line = getline(lnum)
if strlen(r) > 2 && l.r !~# '\\'
@ -54,7 +60,7 @@ function! s:go(...) abort
if uncomment
let line = substitute(line,'\S.*\s\@<!','\=submatch(0)[strlen(l):-strlen(r)-1]','')
else
let line = substitute(line,'^\%('.matchstr(getline(lnum1),'^\s*').'\|\s*\)\zs.*\S\@<=','\=l.submatch(0).r','')
let line = substitute(line,'^\%('.matchstr(getline(lnum1),indent).'\|\s*\)\zs.*\S\@<=','\=l.submatch(0).r','')
endif
call setline(lnum,line)
endfor