Added vim-commentary and updarted the plugins.
commentary: Comment stuff out. Use `gcc` to comment out a line (takes a count), `gc` to comment out the target of a motion (for example, `gcap` to comment out a paragraph), and `gc` in visual mode to comment out the selection. That's it.
This commit is contained in:
1 parent
8c9210dca4
commit
0d8e7370bd
56 files changed
+1330
-873
No files matched your search
@@ -1,4 +1,4 @@
|
||||
if exists("g:loaded_syntastic_postprocess_autoload")
|
||||
if exists("g:loaded_syntastic_postprocess_autoload") || !exists("g:loaded_syntastic_plugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_postprocess_autoload = 1
|
||||
@@ -6,7 +6,9 @@ let g:loaded_syntastic_postprocess_autoload = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! s:compareErrorItems(a, b)
|
||||
" Public functions {{{1
|
||||
|
||||
function! s:compareErrorItems(a, b) " {{{2
|
||||
if a:a['bufnr'] != a:b['bufnr']
|
||||
" group by files
|
||||
return a:a['bufnr'] - a:b['bufnr']
|
||||
@@ -18,15 +20,15 @@ function! s:compareErrorItems(a, b)
|
||||
else
|
||||
return get(a:a, 'col', 0) - get(a:b, 'col', 0)
|
||||
endif
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" natural sort
|
||||
function! syntastic#postprocess#sort(errors)
|
||||
function! syntastic#postprocess#sort(errors) " {{{2
|
||||
return sort(copy(a:errors), 's:compareErrorItems')
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" merge consecutive blanks
|
||||
function! syntastic#postprocess#compressWhitespace(errors)
|
||||
function! syntastic#postprocess#compressWhitespace(errors) " {{{2
|
||||
for e in a:errors
|
||||
let e['text'] = substitute(e['text'], "\001", '', 'g')
|
||||
let e['text'] = substitute(e['text'], '\n', ' ', 'g')
|
||||
@@ -34,10 +36,10 @@ function! syntastic#postprocess#compressWhitespace(errors)
|
||||
endfor
|
||||
|
||||
return a:errors
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" remove spurious CR under Cygwin
|
||||
function! syntastic#postprocess#cygwinRemoveCR(errors)
|
||||
function! syntastic#postprocess#cygwinRemoveCR(errors) " {{{2
|
||||
if has('win32unix')
|
||||
for e in a:errors
|
||||
let e['text'] = substitute(e['text'], '\r', '', 'g')
|
||||
@@ -45,23 +47,25 @@ function! syntastic#postprocess#cygwinRemoveCR(errors)
|
||||
endif
|
||||
|
||||
return a:errors
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" decode XML entities
|
||||
function! syntastic#postprocess#decodeXMLEntities(errors)
|
||||
function! syntastic#postprocess#decodeXMLEntities(errors) " {{{2
|
||||
for e in a:errors
|
||||
let e['text'] = syntastic#util#decodeXMLEntities(e['text'])
|
||||
endfor
|
||||
|
||||
return a:errors
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" filter out errors referencing other files
|
||||
function! syntastic#postprocess#filterForeignErrors(errors)
|
||||
function! syntastic#postprocess#filterForeignErrors(errors) " {{{2
|
||||
return filter(copy(a:errors), 'get(v:val, "bufnr") == ' . bufnr(''))
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
Reference in new issue
Block a user