From c2ae99ad8b608d8f74e30b3d43afca6997f328ac Mon Sep 17 00:00:00 2001 From: vsooda Date: Sat, 8 Nov 2014 13:32:59 +0800 Subject: [PATCH] molokai --- my_configs.vim | 5 + .../syntastic/autoload/syntastic/log.vim | 4 +- .../syntastic/autoload/syntastic/util.vim | 4 +- .../syntastic/doc/syntastic.txt | 2 +- .../syntastic/plugin/syntastic.vim | 124 +++++++++--------- .../plugin/syntastic/autoloclist.vim | 4 +- .../syntastic/plugin/syntastic/balloons.vim | 22 +--- .../syntastic/plugin/syntastic/checker.vim | 12 +- .../syntastic/plugin/syntastic/cursor.vim | 4 +- .../plugin/syntastic/highlighting.vim | 4 +- .../syntastic/plugin/syntastic/loclist.vim | 29 +++- .../syntastic/plugin/syntastic/modemap.vim | 2 +- .../syntastic/plugin/syntastic/notifiers.vim | 20 +-- .../syntastic/plugin/syntastic/registry.vim | 16 +-- .../syntastic/plugin/syntastic/signs.vim | 2 +- .../syntax_checkers/elixir/elixir.vim | 2 +- .../syntastic/syntax_checkers/html/tidy.vim | 24 ++-- .../javascript/closurecompiler.vim | 10 +- .../syntastic/syntax_checkers/sh/bashate.vim | 48 +++++++ .../syntastic/syntax_checkers/xhtml/tidy.vim | 4 +- .../taglist.vim/plugin/taglist.vim | 4 - sources_non_forked/vim-airline/README.md | 10 ++ .../autoload/airline/extensions/tabline.vim | 4 +- sources_non_forked/vim-molokai | 1 + sources_non_forked/vim-monokai | 1 + .../vim-snippets/UltiSnips/html.snippets | 12 +- .../vim-snippets/snippets/eruby.snippets | 2 +- 27 files changed, 229 insertions(+), 147 deletions(-) create mode 100644 sources_non_forked/syntastic/syntax_checkers/sh/bashate.vim create mode 160000 sources_non_forked/vim-molokai create mode 160000 sources_non_forked/vim-monokai diff --git a/my_configs.vim b/my_configs.vim index 5aec5695..f58c9b8a 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,5 +1,10 @@ nnoremap :exe 'NERDTreeToggle' :exe 'Tlist' let Tlist_Use_Split_Window = 1 +"sudo apt-get install ncurses-term +"export TERM=xterm-256color(.bashrc) +colorscheme molokai +"colorscheme monokai +inoremap {} {o}O map 1 :tabnext 1 map 2 :tabnext 2 map 3 :tabnext 3 diff --git a/sources_non_forked/syntastic/autoload/syntastic/log.vim b/sources_non_forked/syntastic/autoload/syntastic/log.vim index df72b3c7..f84eb1d2 100644 --- a/sources_non_forked/syntastic/autoload/syntastic/log.vim +++ b/sources_non_forked/syntastic/autoload/syntastic/log.vim @@ -120,7 +120,7 @@ function! syntastic#log#debugDump(level) " {{{2 return endif - call syntastic#log#debugShowVariables( a:level, sort(keys(g:syntastic_defaults)) ) + call syntastic#log#debugShowVariables( a:level, sort(keys(g:_SYNTASTIC_DEFAULTS)) ) endfunction " }}}2 " }}}1 @@ -155,7 +155,7 @@ function! s:_logRedirect(on) " {{{2 endfunction " }}}2 function! s:_logTimestamp() " {{{2 - return 'syntastic: ' . split(reltimestr(reltime(g:syntastic_start)))[0] . ': ' + return 'syntastic: ' . split(reltimestr(reltime(g:_SYNTASTIC_START)))[0] . ': ' endfunction " }}}2 function! s:_formatVariable(name) " {{{2 diff --git a/sources_non_forked/syntastic/autoload/syntastic/util.vim b/sources_non_forked/syntastic/autoload/syntastic/util.vim index e58b00bc..27ef34b2 100644 --- a/sources_non_forked/syntastic/autoload/syntastic/util.vim +++ b/sources_non_forked/syntastic/autoload/syntastic/util.vim @@ -274,7 +274,7 @@ endfunction " }}}2 function! syntastic#util#dictFilter(errors, filter) " {{{2 let rules = s:_translateFilter(a:filter) - " call syntastic#log#debug(g:SyntasticDebugFilters, "applying filter:", rules) + " call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, "applying filter:", rules) try call filter(a:errors, rules) catch /\m^Vim\%((\a\+)\)\=:E/ @@ -287,7 +287,7 @@ endfunction " }}}2 " (hopefully high resolution) since program start " TODO: This assumes reltime() returns a list of integers. function! syntastic#util#stamp() " {{{2 - return reltime(g:syntastic_start) + return reltime(g:_SYNTASTIC_START) endfunction " }}}2 " }}}1 diff --git a/sources_non_forked/syntastic/doc/syntastic.txt b/sources_non_forked/syntastic/doc/syntastic.txt index 336f0f51..b497263b 100644 --- a/sources_non_forked/syntastic/doc/syntastic.txt +++ b/sources_non_forked/syntastic/doc/syntastic.txt @@ -725,7 +725,7 @@ for python in syntastic (see |syntastic_mode_map|), or disable lint checks in Syntastic can be used together with the 'YouCompleteMe' Vim plugin (see http://valloric.github.io/YouCompleteMe/). However, by default 'YouCompleteMe' -disables syntastic"s checkers for the "c", "cpp", "objc", and "objcpp" +disables syntastic's checkers for the "c", "cpp", "objc", and "objcpp" filetypes, in order to allow its own checkers to run. If you want to use YCM's identifier completer but still run syntastic's checkers for those filetypes you have to set |ycm_show_diagnostics_ui| to 0. E.g.: > diff --git a/sources_non_forked/syntastic/plugin/syntastic.vim b/sources_non_forked/syntastic/plugin/syntastic.vim index 353e2dc7..d18cf93b 100644 --- a/sources_non_forked/syntastic/plugin/syntastic.vim +++ b/sources_non_forked/syntastic/plugin/syntastic.vim @@ -15,12 +15,12 @@ endif let g:loaded_syntastic_plugin = 1 if has('reltime') - let g:syntastic_start = reltime() - lockvar! g:syntastic_start + let g:_SYNTASTIC_START = reltime() + lockvar! g:_SYNTASTIC_START endif -let g:syntastic_version = '3.5.0-69' -lockvar g:syntastic_version +let g:_SYNTASTIC_VERSION = '3.5.0-72' +lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 @@ -39,24 +39,24 @@ for s:feature in [ endif endfor -let s:running_windows = syntastic#util#isRunningWindows() -lockvar s:running_windows +let s:_running_windows = syntastic#util#isRunningWindows() +lockvar s:_running_windows -if !s:running_windows && executable('uname') +if !s:_running_windows && executable('uname') try - let s:uname = system('uname') + let s:_uname = system('uname') catch /\m^Vim\%((\a\+)\)\=:E484/ call syntastic#log#error("your shell " . &shell . " can't handle traditional UNIX syntax for redirections") finish endtry - lockvar s:uname + lockvar s:_uname endif " }}}1 " Defaults {{{1 -let g:syntastic_defaults = { +let g:_SYNTASTIC_DEFAULTS = { \ 'aggregate_errors': 0, \ 'always_populate_loc_list': 0, \ 'auto_jump': 0, @@ -71,7 +71,7 @@ let g:syntastic_defaults = { \ 'enable_highlighting': 1, \ 'enable_signs': 1, \ 'error_symbol': '>>', - \ 'exit_checks': !(s:running_windows && &shell =~? '\m\', \ 'warning_symbol': '>>' \ } -lockvar! g:syntastic_defaults +lockvar! g:_SYNTASTIC_DEFAULTS -for s:key in keys(g:syntastic_defaults) +for s:key in keys(g:_SYNTASTIC_DEFAULTS) if !exists('g:syntastic_' . s:key) - let g:syntastic_{s:key} = copy(g:syntastic_defaults[s:key]) + let g:syntastic_{s:key} = copy(g:_SYNTASTIC_DEFAULTS[s:key]) endif endfor @@ -110,7 +110,7 @@ endif " Debug {{{1 -let s:debug_dump_options = [ +let s:_DEBUG_DUMP_OPTIONS = [ \ 'shell', \ 'shellcmdflag', \ 'shellpipe', @@ -121,23 +121,23 @@ let s:debug_dump_options = [ \ 'shellxquote' \ ] if v:version > 703 || (v:version == 703 && has('patch446')) - call add(s:debug_dump_options, 'shellxescape') + call add(s:_DEBUG_DUMP_OPTIONS, 'shellxescape') endif -lockvar! s:debug_dump_options +lockvar! s:_DEBUG_DUMP_OPTIONS " debug constants -let g:SyntasticDebugTrace = 1 -lockvar g:SyntasticDebugTrace -let g:SyntasticDebugLoclist = 2 -lockvar g:SyntasticDebugLoclist -let g:SyntasticDebugNotifications = 4 -lockvar g:SyntasticDebugNotifications -let g:SyntasticDebugAutocommands = 8 -lockvar g:SyntasticDebugAutocommands -let g:SyntasticDebugVariables = 16 -lockvar g:SyntasticDebugVariables -let g:SyntasticDebugCheckers = 32 -lockvar g:SyntasticDebugCheckers +let g:_SYNTASTIC_DEBUG_TRACE = 1 +lockvar g:_SYNTASTIC_DEBUG_TRACE +let g:_SYNTASTIC_DEBUG_LOCLIST = 2 +lockvar g:_SYNTASTIC_DEBUG_LOCLIST +let g:_SYNTASTIC_DEBUG_NOTIFICATIONS = 4 +lockvar g:_SYNTASTIC_DEBUG_NOTIFICATIONS +let g:_SYNTASTIC_DEBUG_AUTOCOMMANDS = 8 +lockvar g:_SYNTASTIC_DEBUG_AUTOCOMMANDS +let g:_SYNTASTIC_DEBUG_VARIABLES = 16 +lockvar g:_SYNTASTIC_DEBUG_VARIABLES +let g:_SYNTASTIC_DEBUG_CHECKERS = 32 +lockvar g:_SYNTASTIC_DEBUG_CHECKERS " }}}1 @@ -207,20 +207,20 @@ endif function! s:BufReadPostHook() " {{{2 if g:syntastic_check_on_open - call syntastic#log#debug(g:SyntasticDebugAutocommands, + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_AUTOCOMMANDS, \ 'autocmd: BufReadPost, buffer ' . bufnr("") . ' = ' . string(bufname(str2nr(bufnr(""))))) call s:UpdateErrors(1) endif endfunction " }}}2 function! s:BufWritePostHook() " {{{2 - call syntastic#log#debug(g:SyntasticDebugAutocommands, + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_AUTOCOMMANDS, \ 'autocmd: BufWritePost, buffer ' . bufnr("") . ' = ' . string(bufname(str2nr(bufnr(""))))) call s:UpdateErrors(1) endfunction " }}}2 function! s:BufEnterHook() " {{{2 - call syntastic#log#debug(g:SyntasticDebugAutocommands, + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_AUTOCOMMANDS, \ 'autocmd: BufEnter, buffer ' . bufnr("") . ' = ' . string(bufname(str2nr(bufnr("")))) . \ ', &buftype = ' . string(&buftype)) if &buftype == '' @@ -239,7 +239,7 @@ function! s:BufEnterHook() " {{{2 endfunction " }}}2 function! s:QuitPreHook() " {{{2 - call syntastic#log#debug(g:SyntasticDebugAutocommands, + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_AUTOCOMMANDS, \ 'autocmd: QuitPre, buffer ' . bufnr("") . ' = ' . string(bufname(str2nr(bufnr(""))))) let b:syntastic_skip_checks = get(b:, 'syntastic_skip_checks', 0) || !syntastic#util#var('check_on_wq') call SyntasticLoclistHide() @@ -251,10 +251,10 @@ endfunction " }}}2 "refresh and redraw all the error info for this buf when saving or reading function! s:UpdateErrors(auto_invoked, ...) " {{{2 - call syntastic#log#debugShowVariables(g:SyntasticDebugTrace, 'version') - call syntastic#log#debugShowOptions(g:SyntasticDebugTrace, s:debug_dump_options) - call syntastic#log#debugDump(g:SyntasticDebugVariables) - call syntastic#log#debug(g:SyntasticDebugTrace, 'UpdateErrors' . (a:auto_invoked ? ' (auto)' : '') . + call syntastic#log#debugShowVariables(g:_SYNTASTIC_DEBUG_TRACE, 'version') + call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, s:_DEBUG_DUMP_OPTIONS) + call syntastic#log#debugDump(g:_SYNTASTIC_DEBUG_VARIABLES) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'UpdateErrors' . (a:auto_invoked ? ' (auto)' : '') . \ ': ' . (a:0 ? join(a:000) : 'default checkers')) if s:skipFile() return @@ -278,11 +278,11 @@ function! s:UpdateErrors(auto_invoked, ...) " {{{2 let w:syntastic_loclist_set = 0 if syntastic#util#var('always_populate_loc_list') || do_jump - call syntastic#log#debug(g:SyntasticDebugNotifications, 'loclist: setloclist (new)') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'loclist: setloclist (new)') call setloclist(0, loclist.getRaw()) let w:syntastic_loclist_set = 1 if run_checks && do_jump && !loclist.isEmpty() - call syntastic#log#debug(g:SyntasticDebugNotifications, 'loclist: jump') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'loclist: jump') silent! lrewind " XXX: Vim doesn't call autocmd commands in a predictible @@ -307,15 +307,15 @@ endfunction " }}}2 "detect and cache all syntax errors in this buffer function! s:CacheErrors(checker_names) " {{{2 - call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: ' . + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'CacheErrors: ' . \ (len(a:checker_names) ? join(a:checker_names) : 'default checkers')) call s:ClearCache() let newLoclist = g:SyntasticLoclist.New([]) if !s:skipFile() " debug logging {{{3 - call syntastic#log#debugShowVariables(g:SyntasticDebugTrace, 'aggregate_errors') - call syntastic#log#debug(g:SyntasticDebugTrace, 'getcwd() = ' . getcwd()) + call syntastic#log#debugShowVariables(g:_SYNTASTIC_DEBUG_TRACE, 'aggregate_errors') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'getcwd() = ' . getcwd()) " }}}3 let filetypes = s:resolveFiletypes() @@ -333,12 +333,12 @@ function! s:CacheErrors(checker_names) " {{{2 for checker in clist let cname = checker.getFiletype() . '/' . checker.getName() if !checker.isAvailable() - call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: Checker ' . cname . ' is not available') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'CacheErrors: Checker ' . cname . ' is not available') let unavailable_checkers += 1 continue endif - call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: Invoking checker: ' . cname) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'CacheErrors: Invoking checker: ' . cname) let loclist = checker.getLocList() @@ -349,7 +349,7 @@ function! s:CacheErrors(checker_names) " {{{2 call add(names, cname) if checker.getWantSort() && !sort_aggregated_errors call loclist.sort() - call syntastic#log#debug(g:SyntasticDebugLoclist, 'sorted:', loclist) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'sorted:', loclist) endif let newLoclist = newLoclist.extend(loclist) @@ -382,15 +382,15 @@ function! s:CacheErrors(checker_names) " {{{2 call syntastic#log#warn('checkers ' . join(a:checker_names, ', ') . ' are not available') endif else - call syntastic#log#debug(g:SyntasticDebugTrace, 'CacheErrors: no checkers available for ' . &filetype) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'CacheErrors: no checkers available for ' . &filetype) endif endif " }}}3 - call syntastic#log#debug(g:SyntasticDebugLoclist, 'aggregated:', newLoclist) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'aggregated:', newLoclist) if sort_aggregated_errors call newLoclist.sort() - call syntastic#log#debug(g:SyntasticDebugLoclist, 'sorted:', newLoclist) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'sorted:', newLoclist) endif endif @@ -429,7 +429,7 @@ endfunction " }}}2 " 'returns' - a list of valid exit codes for the checker " @vimlint(EVL102, 1, l:env_save) function! SyntasticMake(options) " {{{2 - call syntastic#log#debug(g:SyntasticDebugTrace, 'SyntasticMake: called with options:', a:options) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'SyntasticMake: called with options:', a:options) " save options and locale env variables {{{3 let old_shellredir = &shellredir @@ -476,14 +476,14 @@ function! SyntasticMake(options) " {{{2 endif " }}}3 - call syntastic#log#debug(g:SyntasticDebugLoclist, 'checker output:', err_lines) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'checker output:', err_lines) if has_key(a:options, 'Preprocess') let err_lines = call(a:options['Preprocess'], [err_lines]) - call syntastic#log#debug(g:SyntasticDebugLoclist, 'preprocess (external):', err_lines) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'preprocess (external):', err_lines) elseif has_key(a:options, 'preprocess') let err_lines = call('syntastic#preprocess#' . a:options['preprocess'], [err_lines]) - call syntastic#log#debug(g:SyntasticDebugLoclist, 'preprocess:', err_lines) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'preprocess:', err_lines) endif lgetexpr err_lines @@ -509,11 +509,11 @@ function! SyntasticMake(options) " {{{2 let &shellredir = old_shellredir " }}}3 - if !s:running_windows && (s:uname() =~ "FreeBSD" || s:uname() =~ "OpenBSD") + if !s:_running_windows && (s:uname() =~ "FreeBSD" || s:uname() =~ "OpenBSD") call syntastic#util#redraw(g:syntastic_full_redraws) endif - call syntastic#log#debug(g:SyntasticDebugLoclist, 'raw loclist:', errors) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'raw loclist:', errors) if syntastic#util#var('exit_checks') && has_key(a:options, 'returns') && index(a:options['returns'], v:shell_error) == -1 throw 'Syntastic: checker error' @@ -532,12 +532,12 @@ function! SyntasticMake(options) " {{{2 for rule in a:options['Postprocess'] let errors = call(rule, [errors]) endfor - call syntastic#log#debug(g:SyntasticDebugLoclist, 'postprocess (external):', errors) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'postprocess (external):', errors) elseif has_key(a:options, 'postprocess') && !empty(a:options['postprocess']) for rule in a:options['postprocess'] let errors = call('syntastic#postprocess#' . rule, [errors]) endfor - call syntastic#log#debug(g:SyntasticDebugLoclist, 'postprocess:', errors) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'postprocess:', errors) endif return errors @@ -578,7 +578,7 @@ function! s:skipFile() " {{{2 \ !filereadable(fname) || getwinvar(0, '&diff') || s:ignoreFile(fname) || \ fnamemodify(fname, ':e') =~? g:syntastic_ignore_extensions if skip - call syntastic#log#debug(g:SyntasticDebugTrace, 'skipFile: skipping') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'skipFile: skipping') endif return skip endfunction " }}}2 @@ -632,7 +632,7 @@ function! s:bashHack() " {{{2 if g:syntastic_bash_hack if !exists('s:shell_is_bash') let s:shell_is_bash = - \ !s:running_windows && + \ !s:_running_windows && \ (s:uname() !~# "FreeBSD") && (s:uname() !~# "OpenBSD") && \ &shell =~# '\m\ 0 - call syntastic#log#debug(g:SyntasticDebugCheckers, leader . a:msg, a:1) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, leader . a:msg, a:1) else - call syntastic#log#debug(g:SyntasticDebugCheckers, leader . a:msg) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, leader . a:msg) endif endfunction " }}}2 @@ -132,11 +132,11 @@ function! g:SyntasticChecker._quietMessages(errors) " {{{2 call syntastic#log#warn('ignoring invalid syntastic_' . name . '_quiet_messages') endtry - call syntastic#log#debug(g:SyntasticDebugLoclist, 'quiet_messages filter:', quiet_filters) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'quiet_messages filter:', quiet_filters) if !empty(quiet_filters) call syntastic#util#dictFilter(a:errors, quiet_filters) - call syntastic#log#debug(g:SyntasticDebugLoclist, 'filtered by quiet_messages:', a:errors) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_LOCLIST, 'filtered by quiet_messages:', a:errors) endif endfunction " }}}2 diff --git a/sources_non_forked/syntastic/plugin/syntastic/cursor.vim b/sources_non_forked/syntastic/plugin/syntastic/cursor.vim index d8410ab1..629cf2d6 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/cursor.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/cursor.vim @@ -18,7 +18,7 @@ endfunction " }}}2 function! g:SyntasticCursorNotifier.refresh(loclist) " {{{2 if self.enabled() && !a:loclist.isEmpty() - call syntastic#log#debug(g:SyntasticDebugNotifications, 'cursor: refresh') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'cursor: refresh') let b:syntastic_messages = copy(a:loclist.messages(bufnr(''))) let b:syntastic_line = -1 let b:syntastic_cursor_columns = a:loclist.getCursorColumns() @@ -29,7 +29,7 @@ endfunction " }}}2 " @vimlint(EVL103, 1, a:loclist) function! g:SyntasticCursorNotifier.reset(loclist) " {{{2 - call syntastic#log#debug(g:SyntasticDebugNotifications, 'cursor: reset') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'cursor: reset') autocmd! syntastic CursorMoved unlet! b:syntastic_messages let b:syntastic_line = -1 diff --git a/sources_non_forked/syntastic/plugin/syntastic/highlighting.vim b/sources_non_forked/syntastic/plugin/syntastic/highlighting.vim index afb6614a..0f027b17 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/highlighting.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/highlighting.vim @@ -32,7 +32,7 @@ endfunction " }}}2 " Sets error highlights in the cuirrent window function! g:SyntasticHighlightingNotifier.refresh(loclist) " {{{2 if self.enabled() - call syntastic#log#debug(g:SyntasticDebugNotifications, 'highlighting: refresh') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'highlighting: refresh') call self._reset() let buf = bufnr('') let issues = filter(a:loclist.copyRaw(), 'v:val["bufnr"] == buf') @@ -63,7 +63,7 @@ endfunction " }}}2 " @vimlint(EVL103, 1, a:loclist) function! g:SyntasticHighlightingNotifier.reset(loclist) " {{{2 if s:has_highlighting - call syntastic#log#debug(g:SyntasticDebugNotifications, 'highlighting: reset') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'highlighting: reset') call self._reset() endif endfunction " }}}2 diff --git a/sources_non_forked/syntastic/plugin/syntastic/loclist.vim b/sources_non_forked/syntastic/plugin/syntastic/loclist.vim index 19a61984..fb7cefb7 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/loclist.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/loclist.vim @@ -173,6 +173,29 @@ function! g:SyntasticLoclist.decorate(tag) " {{{2 endfor endfunction " }}}2 +function! g:SyntasticLoclist.balloons() " {{{2 + if !exists("self._cachedBalloons") + let sep = has("balloon_multiline") ? "\n" : ' | ' + + let self._cachedBalloons = {} + for e in self._rawLoclist + let buf = e['bufnr'] + + if !has_key(self._cachedBalloons, buf) + let self._cachedBalloons[buf] = {} + endif + + if has_key(self._cachedBalloons[buf], e['lnum']) + let self._cachedBalloons[buf][e['lnum']] .= sep . e['text'] + else + let self._cachedBalloons[buf][e['lnum']] = e['text'] + endif + endfor + endif + + return get(self._cachedBalloons, bufnr(''), {}) +endfunction " }}}2 + function! g:SyntasticLoclist.errors() " {{{2 if !exists("self._cachedErrors") let self._cachedErrors = self.filter({'type': "E"}) @@ -258,14 +281,14 @@ function! g:SyntasticLoclist.setloclist() " {{{2 let w:syntastic_loclist_set = 0 endif let replace = g:syntastic_reuse_loc_lists && w:syntastic_loclist_set - call syntastic#log#debug(g:SyntasticDebugNotifications, 'loclist: setloclist ' . (replace ? '(replace)' : '(new)')) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'loclist: setloclist ' . (replace ? '(replace)' : '(new)')) call setloclist(0, self.getRaw(), replace ? 'r' : ' ') let w:syntastic_loclist_set = 1 endfunction " }}}2 "display the cached errors for this buf in the location list function! g:SyntasticLoclist.show() " {{{2 - call syntastic#log#debug(g:SyntasticDebugNotifications, 'loclist: show') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'loclist: show') call self.setloclist() if !self.isEmpty() @@ -300,7 +323,7 @@ endfunction " }}}2 " Non-method functions {{{1 function! SyntasticLoclistHide() " {{{2 - call syntastic#log#debug(g:SyntasticDebugNotifications, 'loclist: hide') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'loclist: hide') silent! lclose endfunction " }}}2 diff --git a/sources_non_forked/syntastic/plugin/syntastic/modemap.vim b/sources_non_forked/syntastic/plugin/syntastic/modemap.vim index dd131bcb..6dd9490d 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/modemap.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/modemap.vim @@ -63,7 +63,7 @@ function! g:SyntasticModeMap.echoMode() " {{{2 endfunction " }}}2 function! g:SyntasticModeMap.modeInfo(...) " {{{2 - echomsg 'Syntastic version: ' . g:syntastic_version + echomsg 'Syntastic version: ' . g:_SYNTASTIC_VERSION let type = a:0 ? a:1 : &filetype echomsg 'Info for filetype: ' . type diff --git a/sources_non_forked/syntastic/plugin/syntastic/notifiers.vim b/sources_non_forked/syntastic/plugin/syntastic/notifiers.vim index 49948b1d..11b72c6a 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/notifiers.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/notifiers.vim @@ -5,11 +5,11 @@ let g:loaded_syntastic_notifiers = 1 let g:SyntasticNotifiers = {} -let s:notifier_types = ['signs', 'balloons', 'highlighting', 'cursor', 'autoloclist'] -lockvar! s:notifier_types +let s:_NOTIFIER_TYPES = ['signs', 'balloons', 'highlighting', 'cursor', 'autoloclist'] +lockvar! s:_NOTIFIER_TYPES -let s:persistent_notifiers = ['signs', 'balloons'] -lockvar! s:persistent_notifiers +let s:_PERSISTENT_NOTIFIERS = ['signs', 'balloons'] +lockvar! s:_PERSISTENT_NOTIFIERS " Public methods {{{1 @@ -28,11 +28,11 @@ function! g:SyntasticNotifiers.refresh(loclist) " {{{2 return endif - call syntastic#log#debug(g:SyntasticDebugNotifications, 'notifiers: refresh') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'notifiers: refresh') for type in self._enabled_types let class = substitute(type, '\m.*', 'Syntastic\u&Notifier', '') if !has_key(g:{class}, 'enabled') || self._notifier[type].enabled() - if index(s:persistent_notifiers, type) > -1 + if index(s:_PERSISTENT_NOTIFIERS, type) > -1 " refresh only if loclist has changed since last call if !exists('b:syntastic_' . type . '_stamp') let b:syntastic_{type}_stamp = [] @@ -49,7 +49,7 @@ function! g:SyntasticNotifiers.refresh(loclist) " {{{2 endfunction " }}}2 function! g:SyntasticNotifiers.reset(loclist) " {{{2 - call syntastic#log#debug(g:SyntasticDebugNotifications, 'notifiers: reset') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'notifiers: reset') for type in self._enabled_types let class = substitute(type, '\m.*', 'Syntastic\u&Notifier', '') @@ -61,7 +61,7 @@ function! g:SyntasticNotifiers.reset(loclist) " {{{2 endif " also reset stamps - if index(s:persistent_notifiers, type) > -1 + if index(s:_PERSISTENT_NOTIFIERS, type) > -1 let b:syntastic_{type}_stamp = [] endif endfor @@ -73,12 +73,12 @@ endfunction " }}}2 function! g:SyntasticNotifiers._initNotifiers() " {{{2 let self._notifier = {} - for type in s:notifier_types + for type in s:_NOTIFIER_TYPES let class = substitute(type, '\m.*', 'Syntastic\u&Notifier', '') let self._notifier[type] = g:{class}.New() endfor - let self._enabled_types = copy(s:notifier_types) + let self._enabled_types = copy(s:_NOTIFIER_TYPES) endfunction " }}}2 " }}}1 diff --git a/sources_non_forked/syntastic/plugin/syntastic/registry.vim b/sources_non_forked/syntastic/plugin/syntastic/registry.vim index 7f130211..8f50f8af 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/registry.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/registry.vim @@ -5,7 +5,7 @@ let g:loaded_syntastic_registry = 1 " Initialisation {{{1 -let s:defaultCheckers = { +let s:_DEFAULT_CHECKERS = { \ 'actionscript':['mxmlc'], \ 'ada': ['gcc'], \ 'applescript': ['osacompile'], @@ -94,9 +94,9 @@ let s:defaultCheckers = { \ 'zpt': ['zptlint'], \ 'zsh': ['zsh', 'shellcheck'] \ } -lockvar! s:defaultCheckers +lockvar! s:_DEFAULT_CHECKERS -let s:defaultFiletypeMap = { +let s:_DEFAULT_FILETYPE_MAP = { \ 'gentoo-metadata': 'xml', \ 'groff': 'nroff', \ 'lhaskell': 'haskell', @@ -106,7 +106,7 @@ let s:defaultFiletypeMap = { \ 'sgml': 'docbk', \ 'sgmllnx': 'docbk', \ } -lockvar! s:defaultFiletypeMap +lockvar! s:_DEFAULT_FILETYPE_MAP let g:SyntasticRegistry = {} @@ -152,7 +152,7 @@ function! g:SyntasticRegistry.getCheckers(ftalias, hints_list) " {{{2 \ !empty(a:hints_list) ? syntastic#util#unique(a:hints_list) : \ exists('b:syntastic_checkers') ? b:syntastic_checkers : \ exists('g:syntastic_' . ft . '_checkers') ? g:syntastic_{ft}_checkers : - \ get(s:defaultCheckers, ft, 0) + \ get(s:_DEFAULT_CHECKERS, ft, 0) return type(names) == type([]) ? \ self._filterCheckersByName(checkers_map, names) : [checkers_map[keys(checkers_map)[0]]] @@ -165,9 +165,9 @@ function! g:SyntasticRegistry.getCheckersAvailable(ftalias, hints_list) " {{{2 endfunction " }}}2 function! g:SyntasticRegistry.getKnownFiletypes() " {{{2 - let types = keys(s:defaultCheckers) + let types = keys(s:_DEFAULT_CHECKERS) - call extend(types, keys(s:defaultFiletypeMap)) + call extend(types, keys(s:_DEFAULT_FILETYPE_MAP)) if exists('g:syntastic_filetype_map') call extend(types, keys(g:syntastic_filetype_map)) @@ -262,7 +262,7 @@ endfunction " }}}2 "resolve filetype aliases, and replace - with _ otherwise we cant name "syntax checker functions legally for filetypes like "gentoo-metadata" function! s:_normaliseFiletype(ftalias) " {{{2 - let ft = get(s:defaultFiletypeMap, a:ftalias, a:ftalias) + let ft = get(s:_DEFAULT_FILETYPE_MAP, a:ftalias, a:ftalias) let ft = get(g:syntastic_filetype_map, ft, ft) let ft = substitute(ft, '\m-', '_', 'g') return ft diff --git a/sources_non_forked/syntastic/plugin/syntastic/signs.vim b/sources_non_forked/syntastic/plugin/syntastic/signs.vim index e2f4b5de..9d169490 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/signs.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/signs.vim @@ -36,7 +36,7 @@ function! g:SyntasticSignsNotifier.enabled() " {{{2 endfunction " }}}2 function! g:SyntasticSignsNotifier.refresh(loclist) " {{{2 - call syntastic#log#debug(g:SyntasticDebugNotifications, 'signs: refresh') + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_NOTIFICATIONS, 'signs: refresh') let old_signs = copy(self._bufSignIds()) if self.enabled() call self._signErrors(a:loclist) diff --git a/sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim b/sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim index 79052700..c834b51e 100644 --- a/sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim +++ b/sources_non_forked/syntastic/syntax_checkers/elixir/elixir.vim @@ -20,7 +20,7 @@ set cpo&vim " TODO: we should probably split this into separate checkers function! SyntaxCheckers_elixir_elixir_IsAvailable() dict - call self.log(g:SyntasticDebugCheckers, + call self.log( \ 'executable("elixir") = ' . executable('elixir') . ', ' . \ 'executable("mix") = ' . executable('mix')) return executable('elixir') && executable('mix') diff --git a/sources_non_forked/syntastic/syntax_checkers/html/tidy.vim b/sources_non_forked/syntastic/syntax_checkers/html/tidy.vim index 8a178996..9070bfae 100644 --- a/sources_non_forked/syntastic/syntax_checkers/html/tidy.vim +++ b/sources_non_forked/syntastic/syntax_checkers/html/tidy.vim @@ -55,7 +55,7 @@ set cpo&vim " TODO: join this with xhtml.vim for DRY's sake? function! s:TidyEncOptByFenc() - let tidy_opts = { + let TIDY_OPTS = { \ 'utf-8': '-utf8', \ 'ascii': '-ascii', \ 'latin1': '-latin1', @@ -69,10 +69,10 @@ function! s:TidyEncOptByFenc() \ 'sjis': '-shiftjis', \ 'cp850': '-ibm858', \ } - return get(tidy_opts, &fileencoding, '-utf8') + return get(TIDY_OPTS, &fileencoding, '-utf8') endfunction -let s:ignore_errors = [ +let s:IGNORE_ERRORS = [ \ " lacks \"summary\" attribute", \ "not approved by W3C", \ " proprietary attribute \"placeholder\"", @@ -123,9 +123,9 @@ let s:ignore_errors = [ \ "proprietary attribute \"aria-valuenow\"", \ "proprietary attribute \"aria-valuetext\"" \ ] -lockvar! s:ignore_errors +lockvar! s:IGNORE_ERRORS -let s:blocklevel_tags = [ +let s:BLOCKLEVEL_TAGS = [ \ "main", \ "section", \ "article", @@ -136,9 +136,9 @@ let s:blocklevel_tags = [ \ "figure", \ "figcaption" \ ] -lockvar! s:blocklevel_tags +lockvar! s:BLOCKLEVEL_TAGS -let s:inline_tags = [ +let s:INLINE_TAGS = [ \ "video", \ "audio", \ "source", @@ -155,16 +155,16 @@ let s:inline_tags = [ \ "details", \ "datalist" \ ] -lockvar! s:inline_tags +lockvar! s:INLINE_TAGS -let s:empty_tags = [ +let s:EMPTY_TAGS = [ \ "wbr", \ "keygen" \ ] -lockvar! s:empty_tags +lockvar! s:EMPTY_TAGS function! s:IgnoreError(text) - for item in s:ignore_errors + g:syntastic_html_tidy_ignore_errors + for item in s:IGNORE_ERRORS + g:syntastic_html_tidy_ignore_errors if stridx(a:text, item) != -1 return 1 endif @@ -173,7 +173,7 @@ function! s:IgnoreError(text) endfunction function! s:NewTags(name) - return syntastic#util#shescape(join( s:{a:name} + g:syntastic_html_tidy_{a:name}, ',' )) + return syntastic#util#shescape(join( s:{toupper(a:name)} + g:syntastic_html_tidy_{a:name}, ',' )) endfunction function! s:Args() diff --git a/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim b/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim index a4d8edd0..6a45fb89 100644 --- a/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim +++ b/sources_non_forked/syntastic/syntax_checkers/javascript/closurecompiler.vim @@ -24,6 +24,11 @@ function! SyntaxCheckers_javascript_closurecompiler_IsAvailable() dict return 0 endif + let s:has_script = exists('g:syntastic_javascript_closurecompiler_script') + if s:has_script + return 1 + endif + let cp = get(g:, 'syntastic_javascript_closurecompiler_path', '') call self.log('g:syntastic_javascript_closurecompiler_path =', cp) @@ -45,14 +50,13 @@ function! SyntaxCheckers_javascript_closurecompiler_GetLocList() dict endif let makeprg = self.makeprgBuild({ - \ 'exe_after': ['-jar', expand(g:syntastic_javascript_closurecompiler_path)], + \ 'exe_after': (s:has_script ? [] : ['-jar', expand(g:syntastic_javascript_closurecompiler_path)]), \ 'args_after': '--js', \ 'fname': file_list }) let errorformat = \ '%-GOK,'. \ '%E%f:%l: ERROR - %m,'. - \ '%Z%p^,'. \ '%W%f:%l: WARNING - %m,'. \ '%Z%p^' @@ -64,7 +68,7 @@ endfunction call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'javascript', \ 'name': 'closurecompiler', - \ 'exec': 'java'}) + \ 'exec': get(g:, 'syntastic_javascript_closurecompiler_script', 'java')}) let &cpo = s:save_cpo unlet s:save_cpo diff --git a/sources_non_forked/syntastic/syntax_checkers/sh/bashate.vim b/sources_non_forked/syntastic/syntax_checkers/sh/bashate.vim new file mode 100644 index 00000000..73b0dcba --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/sh/bashate.vim @@ -0,0 +1,48 @@ +"============================================================================ +"File: bashate.vim +"Description: Bash script style checking plugin for syntastic.vim +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists("g:loaded_syntastic_sh_bashate_checker") + finish +endif +let g:loaded_syntastic_sh_bashate_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_sh_bashate_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%EE%n: %m,' . + \ '%Z - %f: L%l,' . + \ '%-G%.%#' + + let loclist = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'subtype': 'Style', + \ 'returns': [0, 1] }) + + for e in loclist + let e['text'] = substitute(e['text'], "\\m: '.*", '', '') + endfor + + return loclist +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'sh', + \ 'name': 'bashate' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim b/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim index 5c3e6330..1eed9209 100644 --- a/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim +++ b/sources_non_forked/syntastic/syntax_checkers/xhtml/tidy.vim @@ -29,7 +29,7 @@ set cpo&vim " TODO: join this with html.vim DRY's sake? function! s:TidyEncOptByFenc() - let tidy_opts = { + let TIDY_OPTS = { \ 'utf-8': '-utf8', \ 'ascii': '-ascii', \ 'latin1': '-latin1', @@ -43,7 +43,7 @@ function! s:TidyEncOptByFenc() \ 'sjis': '-shiftjis', \ 'cp850': '-ibm858', \ } - return get(tidy_opts, &fileencoding, '-utf8') + return get(TIDY_OPTS, &fileencoding, '-utf8') endfunction function! s:IgnoreError(text) diff --git a/sources_non_forked/taglist.vim/plugin/taglist.vim b/sources_non_forked/taglist.vim/plugin/taglist.vim index 45ad380a..59901f64 100644 --- a/sources_non_forked/taglist.vim/plugin/taglist.vim +++ b/sources_non_forked/taglist.vim/plugin/taglist.vim @@ -1287,10 +1287,6 @@ function! s:Tlist_Window_Create() let win_dir = 'botright' " Horizontal window height let win_size = g:Tlist_WinHeight - elseif g:Tlist_Use_Split_Window - " Open the window in a horizontal split of current window - let win_dir = 'abo' - let win_size = g:Tlist_WinWidth else if s:tlist_winsize_chgd == -1 " Open a vertically split window. Increase the window size, if diff --git a/sources_non_forked/vim-airline/README.md b/sources_non_forked/vim-airline/README.md index 0b4ac57f..eaf1a47e 100644 --- a/sources_non_forked/vim-airline/README.md +++ b/sources_non_forked/vim-airline/README.md @@ -144,6 +144,16 @@ Finally, you can add the convenience variable `let g:airline_powerline_fonts = 1 Solutions to common problems can be found in the [Wiki][27]. +# Performance + +Whoa! Everything got slow all of a sudden... + +vim-airline strives to make it easy to use out of the box, which means that by default it will look for all compatible plugins that you have installed and enable the relevant extension. + +Many optimizations have been made such that the majority of users will not see any performance degradation, but it can still happen. For example, users who routinely open very large files may want to disable the tagbar extension, as it can be very expensive to scan for the name of the current function. + +The [minivimrc][7] project has some helper mappings to troubleshoot performance related issues. + # Screenshots A full list of screenshots for various themes can be found in the [Wiki][14]. diff --git a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim index 955f3db1..e0111a59 100644 --- a/sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim +++ b/sources_non_forked/vim-airline/autoload/airline/extensions/tabline.vim @@ -17,8 +17,8 @@ let s:builder_context = { \ 'right_alt_sep' : get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), \ } if get(g:, 'airline_powerline_fonts', 0) - let s:builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , "\ue0b0") - let s:builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , "\ue0b1") + let s:builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , g:airline_left_sep) + let s:builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , g:airline_left_alt_sep) else let s:builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') let s:builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') diff --git a/sources_non_forked/vim-molokai b/sources_non_forked/vim-molokai new file mode 160000 index 00000000..db8ce13b --- /dev/null +++ b/sources_non_forked/vim-molokai @@ -0,0 +1 @@ +Subproject commit db8ce13b3737d3ddea8368498183d7c204a762eb diff --git a/sources_non_forked/vim-monokai b/sources_non_forked/vim-monokai new file mode 160000 index 00000000..168adeac --- /dev/null +++ b/sources_non_forked/vim-monokai @@ -0,0 +1 @@ +Subproject commit 168adeac992d5fd907803b4f4966c4f80263097f diff --git a/sources_non_forked/vim-snippets/UltiSnips/html.snippets b/sources_non_forked/vim-snippets/UltiSnips/html.snippets index fee451f9..079db914 100644 --- a/sources_non_forked/vim-snippets/UltiSnips/html.snippets +++ b/sources_non_forked/vim-snippets/UltiSnips/html.snippets @@ -160,10 +160,6 @@ snippet base "XHTML " w endsnippet -snippet img "XHTML " w - -endsnippet - snippet body "XHTML " " w +snippet div. "
with class" w + + $0 +
+endsnippet + +snippet div# "
with ID & class" w $0
diff --git a/sources_non_forked/vim-snippets/snippets/eruby.snippets b/sources_non_forked/vim-snippets/snippets/eruby.snippets index 1b206e3d..00696963 100644 --- a/sources_non_forked/vim-snippets/snippets/eruby.snippets +++ b/sources_non_forked/vim-snippets/snippets/eruby.snippets @@ -128,4 +128,4 @@ snippet ife ${0} <% end %> snippet pry - <% require 'pry'; binding.pry %> + <% require 'pry'; binding.pry %>