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_log_autoload")
|
||||
if exists("g:loaded_syntastic_log_autoload") || !exists("g:loaded_syntastic_plugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_log_autoload = 1
|
||||
@@ -6,67 +6,37 @@ let g:loaded_syntastic_log_autoload = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists("g:syntastic_debug")
|
||||
let g:syntastic_debug = 0
|
||||
endif
|
||||
|
||||
let s:global_options = [
|
||||
\ 'syntastic_aggregate_errors',
|
||||
\ 'syntastic_always_populate_loc_list',
|
||||
\ 'syntastic_auto_jump',
|
||||
\ 'syntastic_auto_loc_list',
|
||||
\ 'syntastic_check_on_open',
|
||||
\ 'syntastic_check_on_wq',
|
||||
\ 'syntastic_debug',
|
||||
\ 'syntastic_echo_current_error',
|
||||
\ 'syntastic_enable_balloons',
|
||||
\ 'syntastic_enable_highlighting',
|
||||
\ 'syntastic_enable_signs',
|
||||
\ 'syntastic_error_symbol',
|
||||
\ 'syntastic_filetype_map',
|
||||
\ 'syntastic_full_redraws',
|
||||
\ 'syntastic_id_checkers',
|
||||
\ 'syntastic_ignore_files',
|
||||
\ 'syntastic_loc_list_height',
|
||||
\ 'syntastic_mode_map',
|
||||
\ 'syntastic_quiet_messages',
|
||||
\ 'syntastic_reuse_loc_lists',
|
||||
\ 'syntastic_stl_format',
|
||||
\ 'syntastic_style_error_symbol',
|
||||
\ 'syntastic_style_warning_symbol',
|
||||
\ 'syntastic_warning_symbol' ]
|
||||
|
||||
let s:deprecation_notices_issued = []
|
||||
|
||||
" Public functions {{{1
|
||||
|
||||
function! syntastic#log#info(msg)
|
||||
function! syntastic#log#info(msg) " {{{2
|
||||
echomsg "syntastic: info: " . a:msg
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#log#warn(msg)
|
||||
function! syntastic#log#warn(msg) " {{{2
|
||||
echohl WarningMsg
|
||||
echomsg "syntastic: warning: " . a:msg
|
||||
echohl None
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#log#error(msg)
|
||||
function! syntastic#log#error(msg) " {{{2
|
||||
execute "normal \<Esc>"
|
||||
echohl ErrorMsg
|
||||
echomsg "syntastic: error: " . a:msg
|
||||
echohl None
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#log#deprecationWarn(msg)
|
||||
function! syntastic#log#deprecationWarn(msg) " {{{2
|
||||
if index(s:deprecation_notices_issued, a:msg) >= 0
|
||||
return
|
||||
endif
|
||||
|
||||
call add(s:deprecation_notices_issued, a:msg)
|
||||
call syntastic#log#warn(a:msg)
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#log#debug(level, msg, ...)
|
||||
function! syntastic#log#debug(level, msg, ...) " {{{2
|
||||
if !s:isDebugEnabled(a:level)
|
||||
return
|
||||
endif
|
||||
@@ -84,9 +54,9 @@ function! syntastic#log#debug(level, msg, ...)
|
||||
endif
|
||||
|
||||
call s:logRedirect(0)
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#log#debugShowOptions(level, names)
|
||||
function! syntastic#log#debugShowOptions(level, names) " {{{2
|
||||
if !s:isDebugEnabled(a:level)
|
||||
return
|
||||
endif
|
||||
@@ -94,15 +64,15 @@ function! syntastic#log#debugShowOptions(level, names)
|
||||
let leader = s:logTimestamp()
|
||||
call s:logRedirect(1)
|
||||
|
||||
let vlist = type(a:names) == type("") ? [a:names] : a:names
|
||||
let vlist = copy(type(a:names) == type("") ? [a:names] : a:names)
|
||||
if !empty(vlist)
|
||||
call map(copy(vlist), "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))")
|
||||
call map(vlist, "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))")
|
||||
echomsg leader . join(vlist, ', ')
|
||||
endif
|
||||
call s:logRedirect(0)
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#log#debugShowVariables(level, names)
|
||||
function! syntastic#log#debugShowVariables(level, names) " {{{2
|
||||
if !s:isDebugEnabled(a:level)
|
||||
return
|
||||
endif
|
||||
@@ -112,39 +82,44 @@ function! syntastic#log#debugShowVariables(level, names)
|
||||
|
||||
let vlist = type(a:names) == type("") ? [a:names] : a:names
|
||||
for name in vlist
|
||||
echomsg leader . s:formatVariable(name)
|
||||
let msg = s:formatVariable(name)
|
||||
if msg != ''
|
||||
echomsg leader . msg
|
||||
endif
|
||||
endfor
|
||||
|
||||
call s:logRedirect(0)
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#log#debugDump(level)
|
||||
function! syntastic#log#debugDump(level) " {{{2
|
||||
if !s:isDebugEnabled(a:level)
|
||||
return
|
||||
endif
|
||||
|
||||
call syntastic#log#debugShowVariables(a:level, s:global_options)
|
||||
endfunction
|
||||
call syntastic#log#debugShowVariables( a:level, sort(keys(g:syntastic_defaults)) )
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
" Private functions {{{1
|
||||
|
||||
function! s:isDebugEnabled_smart(level)
|
||||
function! s:isDebugEnabled_smart(level) " {{{2
|
||||
return and(g:syntastic_debug, a:level)
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:isDebugEnabled_dumb(level)
|
||||
function! s:isDebugEnabled_dumb(level) " {{{2
|
||||
" poor man's bit test for bit N, assuming a:level == 2**N
|
||||
return (g:syntastic_debug / a:level) % 2
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
let s:isDebugEnabled = function(exists('*and') ? 's:isDebugEnabled_smart' : 's:isDebugEnabled_dumb')
|
||||
|
||||
function! s:logRedirect(on)
|
||||
function! s:logRedirect(on) " {{{2
|
||||
if exists("g:syntastic_debug_file")
|
||||
if a:on
|
||||
try
|
||||
execute 'redir >> ' . fnameescape(expand(g:syntastic_debug_file))
|
||||
catch /^Vim\%((\a\+)\)\=:/
|
||||
catch /\m^Vim\%((\a\+)\)\=:/
|
||||
silent! redir END
|
||||
unlet g:syntastic_debug_file
|
||||
endtry
|
||||
@@ -152,30 +127,33 @@ function! s:logRedirect(on)
|
||||
silent! redir END
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:logTimestamp_smart()
|
||||
function! s:logTimestamp_smart() " {{{2
|
||||
return 'syntastic: ' . split(reltimestr(reltime(g:syntastic_start)))[0] . ': '
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
function! s:logTimestamp_dumb()
|
||||
function! s:logTimestamp_dumb() " {{{2
|
||||
return 'syntastic: debug: '
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
let s:logTimestamp = function(has('reltime') ? 's:logTimestamp_smart' : 's:logTimestamp_dumb')
|
||||
|
||||
function! s:formatVariable(name)
|
||||
function! s:formatVariable(name) " {{{2
|
||||
let vals = []
|
||||
if exists('g:' . a:name)
|
||||
call add(vals, 'g:' . a:name . ' = ' . strtrans(string(g:{a:name})))
|
||||
if exists('g:syntastic_' . a:name)
|
||||
call add(vals, 'g:syntastic_' . a:name . ' = ' . strtrans(string(g:syntastic_{a:name})))
|
||||
endif
|
||||
if exists('b:' . a:name)
|
||||
call add(vals, 'b:' . a:name . ' = ' . strtrans(string(b:{a:name})))
|
||||
if exists('b:syntastic_' . a:name)
|
||||
call add(vals, 'b:syntastic_' . a:name . ' = ' . strtrans(string(b:syntastic_{a:name})))
|
||||
endif
|
||||
|
||||
return join(vals, ', ')
|
||||
endfunction
|
||||
endfunction " }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: set et sts=4 sw=4 fdm=marker:
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
Reference in new issue
Block a user