Updated vim plugins

pull/273/head
amix 7 years ago
parent aad95603ea
commit 1494e2edfa
  1. 40
      sources_non_forked/ctrlp.vim/autoload/ctrlp.vim
  2. 3
      sources_non_forked/ctrlp.vim/doc/ctrlp.cnx
  3. 3
      sources_non_forked/ctrlp.vim/doc/ctrlp.txt
  4. 2
      sources_non_forked/ctrlp.vim/plugin/ctrlp.vim
  5. 104
      sources_non_forked/lightline.vim/README.md
  6. 10
      sources_non_forked/lightline.vim/autoload/lightline.vim
  7. 36
      sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Dracula.vim
  8. 63
      sources_non_forked/lightline.vim/autoload/lightline/colorscheme/one.vim
  9. 110
      sources_non_forked/lightline.vim/doc/lightline.txt
  10. 4
      sources_non_forked/nerdtree/CHANGELOG
  11. 14
      sources_non_forked/nerdtree/README.markdown
  12. 32
      sources_non_forked/nerdtree/autoload/nerdtree.vim
  13. 4
      sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim
  14. 2
      sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim
  15. 4
      sources_non_forked/nerdtree/plugin/NERD_tree.vim
  16. 4
      sources_non_forked/nerdtree/syntax/nerdtree.vim
  17. 92
      sources_non_forked/syntastic/README.markdown
  18. 4
      sources_non_forked/syntastic/autoload/syntastic/log.vim
  19. 44
      sources_non_forked/syntastic/autoload/syntastic/util.vim
  20. 312
      sources_non_forked/syntastic/doc/syntastic-checkers.txt
  21. 81
      sources_non_forked/syntastic/doc/syntastic.txt
  22. 57
      sources_non_forked/syntastic/plugin/syntastic.vim
  23. 47
      sources_non_forked/syntastic/plugin/syntastic/checker.vim
  24. 8
      sources_non_forked/syntastic/plugin/syntastic/loclist.vim
  25. 11
      sources_non_forked/syntastic/plugin/syntastic/modemap.vim
  26. 101
      sources_non_forked/syntastic/plugin/syntastic/registry.vim
  27. 23
      sources_non_forked/syntastic/syntax_checkers/asciidoc/proselint.vim
  28. 94
      sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim
  29. 23
      sources_non_forked/syntastic/syntax_checkers/help/proselint.vim
  30. 46
      sources_non_forked/syntastic/syntax_checkers/html/htmlhint.vim
  31. 23
      sources_non_forked/syntastic/syntax_checkers/html/proselint.vim
  32. 23
      sources_non_forked/syntastic/syntax_checkers/markdown/proselint.vim
  33. 2
      sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim
  34. 23
      sources_non_forked/syntastic/syntax_checkers/nroff/proselint.vim
  35. 23
      sources_non_forked/syntastic/syntax_checkers/pod/proselint.vim
  36. 23
      sources_non_forked/syntastic/syntax_checkers/rst/proselint.vim
  37. 23
      sources_non_forked/syntastic/syntax_checkers/tex/proselint.vim
  38. 23
      sources_non_forked/syntastic/syntax_checkers/texinfo/proselint.vim
  39. 45
      sources_non_forked/syntastic/syntax_checkers/text/proselint.vim
  40. 3
      sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim
  41. 23
      sources_non_forked/syntastic/syntax_checkers/xhtml/proselint.vim
  42. 1
      sources_non_forked/tabular/.gitignore
  43. 24
      sources_non_forked/tabular/LICENSE.md
  44. 29
      sources_non_forked/tabular/README.md
  45. 73
      sources_non_forked/tabular/after/plugin/TabularMaps.vim
  46. 409
      sources_non_forked/tabular/autoload/tabular.vim
  47. 260
      sources_non_forked/tabular/doc/Tabular.txt
  48. 346
      sources_non_forked/tabular/plugin/Tabular.vim
  49. 14
      sources_non_forked/vim-flake8/README.mdown
  50. 8
      sources_non_forked/vim-fugitive/plugin/fugitive.vim
  51. 10
      sources_non_forked/vim-go/CHANGELOG.md
  52. 2
      sources_non_forked/vim-go/LICENSE
  53. 5
      sources_non_forked/vim-go/autoload/go/complete.vim
  54. 2
      sources_non_forked/vim-go/autoload/go/def.vim
  55. 3
      sources_non_forked/vim-go/autoload/go/tool.vim
  56. 25
      sources_non_forked/vim-go/autoload/go/util.vim
  57. 6
      sources_non_forked/vim-go/doc/vim-go.txt
  58. 4
      sources_non_forked/vim-go/plugin/go.vim
  59. 8
      sources_non_forked/vim-go/syntax/go.vim
  60. 8
      sources_non_forked/vim-pug/syntax/pug.vim
  61. 4
      sources_non_forked/vim-snippets/UltiSnips/all.snippets
  62. 6
      sources_non_forked/vim-snippets/UltiSnips/html.snippets
  63. 10
      sources_non_forked/vim-snippets/UltiSnips/javascript.snippets
  64. 8
      sources_non_forked/vim-snippets/UltiSnips/php-laravel.snippets
  65. 2
      sources_non_forked/vim-snippets/UltiSnips/php-symfony2.snippets
  66. 2
      sources_non_forked/vim-snippets/pythonx/vimsnippets.py
  67. 32
      sources_non_forked/vim-snippets/snippets/arduino.snippets
  68. 10
      sources_non_forked/vim-snippets/snippets/c.snippets
  69. 4
      sources_non_forked/vim-snippets/snippets/elixir.snippets
  70. 2
      sources_non_forked/vim-snippets/snippets/html.snippets
  71. 8
      sources_non_forked/vim-snippets/snippets/java.snippets
  72. 2
      sources_non_forked/vim-snippets/snippets/javascript-bemjson.snippets
  73. 0
      sources_non_forked/vim-snippets/snippets/javascript-d3.snippets
  74. 4
      sources_non_forked/vim-snippets/snippets/javascript-mocha.snippets
  75. 81
      sources_non_forked/vim-snippets/snippets/javascript.es6.react.snippets
  76. 83
      sources_non_forked/vim-snippets/snippets/javascript/javascript-react.snippets
  77. 24
      sources_non_forked/vim-snippets/snippets/javascript/javascript.es6.snippets
  78. 19
      sources_non_forked/vim-snippets/snippets/javascript/javascript.snippets
  79. 12
      sources_non_forked/vim-snippets/snippets/php.snippets
  80. 58
      sources_non_forked/vim-snippets/snippets/ps1.snippets
  81. 4
      sources_non_forked/vim-snippets/snippets/stylus.snippets

@ -98,6 +98,7 @@ let [s:pref, s:bpref, s:opts, s:new_opts, s:lc_opts] =
\ 'bufname_mod': ['s:bufname_mod', ':t'],
\ 'bufpath_mod': ['s:bufpath_mod', ':~:.:h'],
\ 'formatline_func': ['s:flfunc', 's:formatline(v:val)'],
\ 'user_command_async': ['s:usrcmdasync', 0],
\ }, {
\ 'open_multiple_files': 's:opmul',
\ 'regexp': 's:regexp',
@ -212,11 +213,13 @@ el
en
let g:ctrlp_builtins = len(g:ctrlp_types)-1
let s:coretypes = filter([
\ ['files', 'fil'],
\ ['buffers', 'buf'],
\ ['mru files', 'mru'],
\ ], 'index(g:ctrlp_types, v:val[1])!=-1')
let s:coretype_names = {
\ 'fil' : 'files',
\ 'buf' : 'buffers',
\ 'mru' : 'mru files',
\ }
let s:coretypes = map(copy(g:ctrlp_types), '[s:coretype_names[v:val], v:val]')
" Get the options {{{2
fu! s:opts(...)
@ -326,11 +329,11 @@ fu! s:Open()
cal s:setupblank()
endf
fu! s:Close(exit)
fu! s:Close()
cal s:buffunc(0)
if winnr('$') == 1
bw!
elsei a:exit
el
try | bun!
cat | clo! | endt
cal s:unmarksigns()
@ -431,6 +434,11 @@ fu! s:GlobPath(dirs, depth)
en
endf
fu! ctrlp#addfile(ch, file)
call add(g:ctrlp_allfiles, a:file)
cal s:BuildPrompt(1)
endf
fu! s:UserCmd(lscmd)
let [path, lscmd] = [s:dyncwd, a:lscmd]
let do_ign =
@ -446,7 +454,13 @@ fu! s:UserCmd(lscmd)
if (has('win32') || has('win64')) && match(&shell, 'sh') != -1
let path = tr(path, '\', '/')
en
if has('patch-7.4-597') && !(has('win32') || has('win64'))
if s:usrcmdasync && v:version >= 800 && exists('*job_start')
if exists('s:job')
call job_stop(s:job)
en
let g:ctrlp_allfiles = []
let s:job = job_start([&shell, &shellcmdflag, printf(lscmd, path)], {'callback': 'ctrlp#addfile'})
elsei has('patch-7.4-597') && !(has('win32') || has('win64'))
let g:ctrlp_allfiles = systemlist(printf(lscmd, path))
el
let g:ctrlp_allfiles = split(system(printf(lscmd, path)), "\n")
@ -658,7 +672,7 @@ fu! s:Update(str)
let pat = s:matcher == {} ? s:SplitPattern(str) : str
let lines = s:nolim == 1 && empty(str) ? copy(g:ctrlp_lines)
\ : s:MatchedItems(g:ctrlp_lines, pat, s:mw_res)
if empty(str) | call clearmatches() | en
if empty(str) | cal clearmatches() | en
cal s:Render(lines, pat)
return lines
endf
@ -923,7 +937,7 @@ fu! s:PrtExit()
let bw = bufwinnr('%')
exe bufwinnr(s:bufnr).'winc w'
if bufnr('%') == s:bufnr && bufname('%') == 'ControlP'
noa cal s:Close(1)
noa cal s:Close()
noa winc p
els
exe bw.'winc w'
@ -2562,6 +2576,10 @@ fu! ctrlp#init(type, ...)
cal s:SetWD(a:0 ? a:1 : {})
cal s:MapNorms()
cal s:MapSpecs()
if empty(g:ctrlp_types) && empty(g:ctrlp_ext_vars)
call ctrlp#exit()
retu
en
if type(a:type) == 0
let type = a:type
el
@ -2588,7 +2606,7 @@ if has('autocmd')
aug CtrlPAug
au!
au BufEnter ControlP cal s:checkbuf()
au BufLeave ControlP noa cal s:Close(0)
au BufLeave ControlP noa cal s:Close()
au VimLeavePre * cal s:leavepre()
aug END
en

@ -885,7 +885,8 @@ MRU mode options:~
ๅœจๅŒน้…็ช—ๅฃๅ’Œๆ็คบ็ฌฆ้ขๆฟไน‹้—ดๅˆ‡ๆข็„ฆ็‚นใ€‚
<esc>,
<c-c>
<c-c>,
<c-g>
้€€ๅ‡บCtrlPใ€‚
็งปๅŠจ:~

@ -943,7 +943,8 @@ Once inside the prompt:~
Toggle the focus between the match window and the prompt.
<esc>,
<c-c>
<c-c>,
<c-g>
Exit CtrlP.
Moving:~

@ -17,7 +17,7 @@ let [g:ctrlp_lines, g:ctrlp_allfiles, g:ctrlp_alltags, g:ctrlp_alldirs,
if !exists('g:ctrlp_map') | let g:ctrlp_map = '<c-p>' | en
if !exists('g:ctrlp_cmd') | let g:ctrlp_cmd = 'CtrlP' | en
com! -n=? -com=dir CtrlP cal ctrlp#init('fil', { 'dir': <q-args> })
com! -n=? -com=dir CtrlP cal ctrlp#init(0, { 'dir': <q-args> })
com! -n=? -com=dir CtrlPMRUFiles cal ctrlp#init('mru', { 'dir': <q-args> })
com! -bar CtrlPBuffer cal ctrlp#init('buf')

@ -415,15 +415,15 @@ let g:lightline = {
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LightLineFugitive',
\ 'readonly': 'LightLineReadonly',
\ 'modified': 'LightLineModified'
\ 'fugitive': 'LightlineFugitive',
\ 'readonly': 'LightlineReadonly',
\ 'modified': 'LightlineModified'
\ },
\ 'separator': { 'left': 'โฎ€', 'right': 'โฎ‚' },
\ 'subseparator': { 'left': 'โฎ', 'right': 'โฎƒ' }
\ }
function! LightLineModified()
function! LightlineModified()
if &filetype == "help"
return ""
elseif &modified
@ -435,7 +435,7 @@ function! LightLineModified()
endif
endfunction
function! LightLineReadonly()
function! LightlineReadonly()
if &filetype == "help"
return ""
elseif &readonly
@ -445,7 +445,7 @@ function! LightLineReadonly()
endif
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
return exists('*fugitive#head') ? fugitive#head() : ''
endfunction
```
@ -464,16 +464,16 @@ let g:lightline = {
\ [ 'fugitive', 'filename' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LightLineFugitive',
\ 'readonly': 'LightLineReadonly',
\ 'modified': 'LightLineModified',
\ 'filename': 'LightLineFilename'
\ 'fugitive': 'LightlineFugitive',
\ 'readonly': 'LightlineReadonly',
\ 'modified': 'LightlineModified',
\ 'filename': 'LightlineFilename'
\ },
\ 'separator': { 'left': 'โฎ€', 'right': 'โฎ‚' },
\ 'subseparator': { 'left': 'โฎ', 'right': 'โฎƒ' }
\ }
function! LightLineModified()
function! LightlineModified()
if &filetype == "help"
return ""
elseif &modified
@ -485,7 +485,7 @@ function! LightLineModified()
endif
endfunction
function! LightLineReadonly()
function! LightlineReadonly()
if &filetype == "help"
return ""
elseif &readonly
@ -495,21 +495,21 @@ function! LightLineReadonly()
endif
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
return exists('*fugitive#head') ? fugitive#head() : ''
endfunction
function! LightLineFilename()
return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
function! LightlineFilename()
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ ('' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
endfunction
```
![lightline.vim - tutorial](https://raw.githubusercontent.com/wiki/itchyny/lightline.vim/image/tutorial/14.png)
Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline)
```vim
function! LightLineFugitive()
function! LightlineFugitive()
if exists("*fugitive#head")
let branch = fugitive#head()
return branch !=# '' ? 'โญ  '.branch : ''
@ -528,7 +528,7 @@ let g:lightline = {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'my_component' ] ] },
\ 'component_function': {
\ 'my_component': 'LightLineComponent', ...
\ 'my_component': 'LightlineComponent', ...
```
This is the end of the tutorial. For more information, see `:help lightline`. Good luck with your nice statuslines.
@ -555,37 +555,37 @@ let g:lightline = {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ]
\ },
\ 'component_function': {
\ 'modified': 'LightLineModified',
\ 'readonly': 'LightLineReadonly',
\ 'fugitive': 'LightLineFugitive',
\ 'filename': 'LightLineFilename',
\ 'fileformat': 'LightLineFileformat',
\ 'filetype': 'LightLineFiletype',
\ 'fileencoding': 'LightLineFileencoding',
\ 'mode': 'LightLineMode',
\ 'modified': 'LightlineModified',
\ 'readonly': 'LightlineReadonly',
\ 'fugitive': 'LightlineFugitive',
\ 'filename': 'LightlineFilename',
\ 'fileformat': 'LightlineFileformat',
\ 'filetype': 'LightlineFiletype',
\ 'fileencoding': 'LightlineFileencoding',
\ 'mode': 'LightlineMode',
\ },
\ 'separator': { 'left': 'โฎ€', 'right': 'โฎ‚' },
\ 'subseparator': { 'left': 'โฎ', 'right': 'โฎƒ' }
\ }
function! LightLineModified()
function! LightlineModified()
return &ft =~ 'help\|vimfiler\|gundo' ? '' : &modified ? '+' : &modifiable ? '' : '-'
endfunction
function! LightLineReadonly()
function! LightlineReadonly()
return &ft !~? 'help\|vimfiler\|gundo' && &readonly ? 'โญค' : ''
endfunction
function! LightLineFilename()
return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
function! LightlineFilename()
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ (&ft == 'vimfiler' ? vimfiler#get_status_string() :
\ &ft == 'unite' ? unite#get_status_string() :
\ &ft == 'vimshell' ? vimshell#get_status_string() :
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
if &ft !~? 'vimfiler\|gundo' && exists("*fugitive#head")
let branch = fugitive#head()
return branch !=# '' ? 'โญ  '.branch : ''
@ -593,19 +593,19 @@ function! LightLineFugitive()
return ''
endfunction
function! LightLineFileformat()
function! LightlineFileformat()
return winwidth(0) > 70 ? &fileformat : ''
endfunction
function! LightLineFiletype()
function! LightlineFiletype()
return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : ''
endfunction
function! LightLineFileencoding()
function! LightlineFileencoding()
return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : ''
endfunction
function! LightLineMode()
function! LightlineMode()
return winwidth(0) > 60 ? lightline#mode() : ''
endfunction
```
@ -640,12 +640,12 @@ let g:lightline = {
\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LightLineFugitive',
\ 'filename': 'LightLineFilename',
\ 'fileformat': 'LightLineFileformat',
\ 'filetype': 'LightLineFiletype',
\ 'fileencoding': 'LightLineFileencoding',
\ 'mode': 'LightLineMode',
\ 'fugitive': 'LightlineFugitive',
\ 'filename': 'LightlineFilename',
\ 'fileformat': 'LightlineFileformat',
\ 'filetype': 'LightlineFiletype',
\ 'fileencoding': 'LightlineFileencoding',
\ 'mode': 'LightlineMode',
\ 'ctrlpmark': 'CtrlPMark',
\ },
\ 'component_expand': {
@ -657,15 +657,15 @@ let g:lightline = {
\ 'subseparator': { 'left': '|', 'right': '|' }
\ }
function! LightLineModified()
function! LightlineModified()
return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-'
endfunction
function! LightLineReadonly()
function! LightlineReadonly()
return &ft !~? 'help' && &readonly ? 'RO' : ''
endfunction
function! LightLineFilename()
function! LightlineFilename()
let fname = expand('%:t')
return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item :
\ fname == '__Tagbar__' ? g:lightline.fname :
@ -673,12 +673,12 @@ function! LightLineFilename()
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
\ &ft == 'unite' ? unite#get_status_string() :
\ &ft == 'vimshell' ? vimshell#get_status_string() :
\ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
\ ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ ('' != fname ? fname : '[No Name]') .
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
try
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
let mark = '' " edit here for cool mark
@ -690,19 +690,19 @@ function! LightLineFugitive()
return ''
endfunction
function! LightLineFileformat()
function! LightlineFileformat()
return winwidth(0) > 70 ? &fileformat : ''
endfunction
function! LightLineFiletype()
function! LightlineFiletype()
return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : ''
endfunction
function! LightLineFileencoding()
function! LightlineFileencoding()
return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : ''
endfunction
function! LightLineMode()
function! LightlineMode()
let fname = expand('%:t')
return fname == '__Tagbar__' ? 'Tagbar' :
\ fname == 'ControlP' ? 'CtrlP' :

@ -2,7 +2,7 @@
" Filename: autoload/lightline.vim
" Author: itchyny
" License: MIT License
" Last Change: 2016/09/04 13:01:40.
" Last Change: 2016/10/05 08:00:00.
" =============================================================================
let s:save_cpo = &cpo
@ -191,10 +191,6 @@ function! lightline#colorscheme() abort
let s:lightline.colorscheme = 'default'
let s:lightline.palette = g:lightline#colorscheme#{s:lightline.colorscheme}#palette
finally
let s:highlight = {}
call lightline#highlight('normal')
call lightline#link()
let s:_ = 0
if has('win32') && !has('gui_running') && &t_Co < 256
for u in values(s:lightline.palette)
for v in values(u)
@ -204,6 +200,10 @@ function! lightline#colorscheme() abort
endfor
endfor
endif
let s:highlight = {}
call lightline#highlight('normal')
call lightline#link()
let s:_ = 0
endtry
endfunction

@ -0,0 +1,36 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/Dracula.vim
" Author: itchyny
" License: MIT License
" Last Change: 2016/11/06 01:08:03.
" =============================================================================
let s:black = [ '#282a36', 235 ]
let s:gray = [ '#44475a', 236 ]
let s:white = [ '#f8f8f2', 231 ]
let s:darkblue = [ '#6272a4', 61 ]
let s:cyan = [ '#8be9fd', 117 ]
let s:green = [ '#50fa7b', 84 ]
let s:orange = [ '#ffb86c', 215 ]
let s:purple = [ '#bd93f9', 141 ]
let s:red = [ '#ff79c6', 212 ]
let s:yellow = [ '#f1fa8c', 228 ]
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [ [ s:black, s:purple ], [ s:cyan, s:gray ] ]
let s:p.normal.right = [ [ s:black, s:purple ], [ s:white, s:darkblue ] ]
let s:p.inactive.right = [ [ s:black, s:gray ], [ s:white, s:black ] ]
let s:p.inactive.left = [ [ s:cyan, s:black ], [ s:white, s:black ] ]
let s:p.insert.left = [ [ s:black, s:green ], [ s:cyan, s:gray ] ]
let s:p.replace.left = [ [ s:black, s:red ], [ s:cyan, s:gray ] ]
let s:p.visual.left = [ [ s:black, s:orange ], [ s:cyan, s:gray ] ]
let s:p.normal.middle = [ [ s:white, s:gray ] ]
let s:p.inactive.middle = [ [ s:white, s:gray ] ]
let s:p.tabline.left = [ [ s:darkblue, s:gray ] ]
let s:p.tabline.tabsel = [ [ s:cyan, s:black ] ]
let s:p.tabline.middle = [ [ s:darkblue, s:gray ] ]
let s:p.tabline.right = copy(s:p.normal.right)
let s:p.normal.error = [ [ s:red, s:black ] ]
let s:p.normal.warning = [ [ s:yellow, s:black ] ]
let g:lightline#colorscheme#Dracula#palette = lightline#colorscheme#flatten(s:p)

@ -0,0 +1,63 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/one.vim
" Author: Zoltan Dalmadi
" License: MIT License
" Last Change: 2016/11/2 17:34:27.
" =============================================================================
" Common colors
let s:fg = '#abb2bf'
let s:blue = '#61afef'
let s:green = '#98c379'
let s:purple = '#c678dd'
let s:red1 = '#e06c75'
let s:red2 = '#be5046'
let s:yellow = '#e5c07b'
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
if &background ==# 'light'
" Light variant
let s:bg = '#fafafa'
let s:gray1 = '#494b53'
let s:gray2 = '#f0f0f0'
let s:gray3 = '#d0d0d0'
let s:p.normal.left = [ [ s:bg, s:green, 'bold' ], [ s:gray1, s:gray3 ] ]
let s:p.normal.middle = [ [ s:gray1, s:gray2 ] ]
let s:p.inactive.left = [ [ s:bg, s:gray3 ], [ s:bg, s:gray3 ] ]
let s:p.inactive.middle = [ [ s:gray3, s:gray2 ] ]
let s:p.inactive.right = [ [ s:bg, s:gray3 ], [ s:bg, s:gray3 ] ]
let s:p.insert.left = [ [ s:bg, s:blue, 'bold' ], [ s:gray1, s:gray3 ] ]
let s:p.replace.left = [ [ s:bg, s:red1, 'bold' ], [ s:gray1, s:gray3 ] ]
let s:p.visual.left = [ [ s:bg, s:purple, 'bold' ], [ s:gray1, s:gray3 ] ]
else
" Dark variant
let s:bg = '#282c34'
let s:gray1 = '#5c6370'
let s:gray2 = '#2c323d'
let s:gray3 = '#3e4452'
let s:p.normal.left = [ [ s:bg, s:green, 'bold' ], [ s:fg, s:gray3 ] ]
let s:p.normal.middle = [ [ s:fg, s:gray2 ] ]
let s:p.inactive.left = [ [ s:gray1, s:bg ], [ s:gray1, s:bg ] ]
let s:p.inactive.middle = [ [ s:gray1, s:gray2 ] ]
let s:p.inactive.right = [ [ s:gray1, s:bg ], [ s:gray1, s:bg ] ]
let s:p.insert.left = [ [ s:bg, s:blue, 'bold' ], [ s:fg, s:gray3 ] ]
let s:p.replace.left = [ [ s:bg, s:red1, 'bold' ], [ s:fg, s:gray3 ] ]
let s:p.visual.left = [ [ s:bg, s:purple, 'bold' ], [ s:fg, s:gray3 ] ]
endif
" Common
let s:p.normal.right = [ [ s:bg, s:green, 'bold' ], [ s:bg, s:green, 'bold' ] ]
let s:p.normal.error = [ [ s:red2, s:bg ] ]
let s:p.normal.warning = [ [ s:yellow, s:bg ] ]
let s:p.insert.right = [ [ s:bg, s:blue, 'bold' ], [ s:bg, s:blue, 'bold' ] ]
let s:p.replace.right = [ [ s:bg, s:red1, 'bold' ], [ s:bg, s:red1, 'bold' ] ]
let s:p.visual.right = [ [ s:bg, s:purple, 'bold' ], [ s:bg, s:purple, 'bold' ] ]
let s:p.tabline.left = [ [ s:bg, s:gray3 ] ]
let s:p.tabline.tabsel = [ [ s:bg, s:purple, 'bold' ] ]
let s:p.tabline.middle = [ [ s:gray3, s:gray2 ] ]
let s:p.tabline.right = copy(s:p.normal.right)
let g:lightline#colorscheme#one#palette = lightline#colorscheme#fill(s:p)

@ -4,7 +4,7 @@ Version: 0.1
Author: itchyny (https://github.com/itchyny)
License: MIT License
Repository: https://github.com/itchyny/lightline.vim
Last Change: 2016/09/13 23:56:56.
Last Change: 2016/10/24 08:12:28.
CONTENTS *lightline-contents*
@ -151,10 +151,10 @@ OPTIONS *lightline-option*
\ [ 'myreadonly', 'filename', 'modified' ] ],
\ },
\ 'component_function': {
\ 'myreadonly': 'LightLineReadonly'
\ 'myreadonly': 'LightlineReadonly'
\ },
\ }
function! LightLineReadonly()
function! LightlineReadonly()
return &ft !~? 'help' && &readonly ? 'RO' : ''
endfunction
<
@ -223,7 +223,7 @@ OPTIONS *lightline-option*
The colorscheme for lightline.vim.
Currently, wombat, solarized, powerline, jellybeans, Tomorrow,
Tomorrow_Night, Tomorrow_Night_Blue, Tomorrow_Night_Eighties,
PaperColor, seoul256, landscape and 16color are available.
PaperColor, seoul256, landscape, one, Dracula, and 16color are available.
The default value is:
>
let g:lightline.colorscheme = 'default'
@ -299,16 +299,16 @@ nice.
\ 'lineinfo': '๎‚ก %3l:%-2v',
\ },
\ 'component_function': {
\ 'readonly': 'LightLineReadonly',
\ 'fugitive': 'LightLineFugitive'
\ 'readonly': 'LightlineReadonly',
\ 'fugitive': 'LightlineFugitive'
\ },
\ 'separator': { 'left': '๎‚ฐ', 'right': '๎‚ฒ' },
\ 'subseparator': { 'left': '๎‚ฑ', 'right': '๎‚ณ' }
\ }
function! LightLineReadonly()
function! LightlineReadonly()
return &readonly ? '๎‚ข' : ''
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
if exists('*fugitive#head')
let branch = fugitive#head()
return branch !=# '' ? '๎‚ '.branch : ''
@ -324,16 +324,16 @@ look nice.
\ 'lineinfo': 'โญก %3l:%-2v',
\ },
\ 'component_function': {
\ 'readonly': 'LightLineReadonly',
\ 'fugitive': 'LightLineFugitive'
\ 'readonly': 'LightlineReadonly',
\ 'fugitive': 'LightlineFugitive'
\ },
\ 'separator': { 'left': 'โฎ€', 'right': 'โฎ‚' },
\ 'subseparator': { 'left': 'โฎ', 'right': 'โฎƒ' }
\ }
function! LightLineReadonly()
function! LightlineReadonly()
return &readonly ? 'โญค' : ''
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
if exists('*fugitive#head')
let branch = fugitive#head()
return branch !=# '' ? 'โญ  '.branch : ''
@ -655,22 +655,22 @@ In order to define your own component:
\ 'left': [ [ 'mode', 'paste' ], [ 'myfilename' ] ]
\ },
\ 'component_function': {
\ 'myfilename': 'LightLineFilename',
\ 'myreadonly': 'LightLineReadonly',
\ 'mymodified': 'LightLineModified',
\ 'myfilename': 'LightlineFilename',
\ 'myreadonly': 'LightlineReadonly',
\ 'mymodified': 'LightlineModified',
\ }
\ }
function! LightLineFilename()
return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
function! LightlineFilename()
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ (&ft == 'vimfiler' ? vimfiler#get_status_string() :
\ &ft == 'unite' ? unite#get_status_string() :
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
endfunction
function! LightLineReadonly()
function! LightlineReadonly()
return &ft !~? 'help' && &readonly ? 'RO' : ''
endfunction
function! LightLineModified()
function! LightlineModified()
return &modifiable && &modified ? '+' : ''
endfunction
<
@ -710,25 +710,25 @@ A nice example for non-patched font users.
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LightLineFugitive',
\ 'filename': 'LightLineFilename'
\ 'fugitive': 'LightlineFugitive',
\ 'filename': 'LightlineFilename'
\ }
\ }
function! LightLineModified()
function! LightlineModified()
return &ft =~ 'help\|vimfiler' ? '' : &modified ? '+' : &modifiable ? '' : '-'
endfunction
function! LightLineReadonly()
function! LightlineReadonly()
return &ft !~? 'help\|vimfiler' && &readonly ? 'RO' : ''
endfunction
function! LightLineFilename()
return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
function! LightlineFilename()
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ (&ft == 'vimfiler' ? vimfiler#get_status_string() :
\ &ft == 'unite' ? unite#get_status_string() :
\ &ft == 'vimshell' ? vimshell#get_status_string() :
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
if &ft !~? 'vimfiler' && exists('*fugitive#head')
return fugitive#head()
endif
@ -743,27 +743,27 @@ A nice example for |vim-powerline| font users:
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LightLineFugitive',
\ 'filename': 'LightLineFilename'
\ 'fugitive': 'LightlineFugitive',
\ 'filename': 'LightlineFilename'
\ },
\ 'separator': { 'left': 'โฎ€', 'right': 'โฎ‚' },
\ 'subseparator': { 'left': 'โฎ', 'right': 'โฎƒ' }
\ }
function! LightLineModified()
function! LightlineModified()
return &ft =~ 'help\|vimfiler' ? '' : &modified ? '+' : &modifiable ? '' : '-'
endfunction
function! LightLineReadonly()
function! LightlineReadonly()
return &ft !~? 'help\|vimfiler' && &readonly ? 'โญค' : ''
endfunction
function! LightLineFilename()
return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
function! LightlineFilename()
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ (&ft == 'vimfiler' ? vimfiler#get_status_string() :
\ &ft == 'unite' ? unite#get_status_string() :
\ &ft == 'vimshell' ? vimshell#get_status_string() :
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
if &ft !~? 'vimfiler' && exists('*fugitive#head')
let branch = fugitive#head()
return branch !=# '' ? 'โญ  '.branch : ''
@ -784,12 +784,12 @@ For users who uses lots of plugins:
\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LightLineFugitive',
\ 'filename': 'LightLineFilename',
\ 'fileformat': 'LightLineFileformat',
\ 'filetype': 'LightLineFiletype',
\ 'fileencoding': 'LightLineFileencoding',
\ 'mode': 'LightLineMode',
\ 'fugitive': 'LightlineFugitive',
\ 'filename': 'LightlineFilename',
\ 'fileformat': 'LightlineFileformat',
\ 'filetype': 'LightlineFiletype',
\ 'fileencoding': 'LightlineFileencoding',
\ 'mode': 'LightlineMode',
\ 'ctrlpmark': 'CtrlPMark',
\ },
\ 'component_expand': {
@ -801,15 +801,15 @@ For users who uses lots of plugins:
\ 'subseparator': { 'left': '|', 'right': '|' }
\ }
function! LightLineModified()
function! LightlineModified()
return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-'
endfunction
function! LightLineReadonly()
function! LightlineReadonly()
return &ft !~? 'help' && &readonly ? 'RO' : ''
endfunction
function! LightLineFilename()
function! LightlineFilename()
let fname = expand('%:t')
return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item :
\ fname == '__Tagbar__' ? g:lightline.fname :
@ -817,12 +817,12 @@ For users who uses lots of plugins:
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
\ &ft == 'unite' ? unite#get_status_string() :
\ &ft == 'vimshell' ? vimshell#get_status_string() :
\ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
\ ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ ('' != fname ? fname : '[No Name]') .
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '')
endfunction
function! LightLineFugitive()
function! LightlineFugitive()
try
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
let mark = '' " edit here for cool mark
@ -834,19 +834,19 @@ For users who uses lots of plugins:
return ''
endfunction
function! LightLineFileformat()
function! LightlineFileformat()
return winwidth(0) > 70 ? &fileformat : ''
endfunction
function! LightLineFiletype()
function! LightlineFiletype()
return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : ''
endfunction
function! LightLineFileencoding()
function! LightlineFileencoding()
return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : ''
endfunction
function! LightLineMode()
function! LightlineMode()
let fname = expand('%:t')
return fname == '__Tagbar__' ? 'Tagbar' :
\ fname == 'ControlP' ? 'CtrlP' :
@ -1189,10 +1189,10 @@ Problem 12: *lightline-problem-12*
>
let g:lightline = {
\ 'component': {
\ 'modified': '%#ModifiedColor#%{LightLineModified()}',
\ 'modified': '%#ModifiedColor#%{LightlineModified()}',
\ }
\ }
function! LightLineModified()
function! LightlineModified()
let map = { 'V': 'n', "\<C-v>": 'n', 's': 'n', 'v': 'n', "\<C-s>": 'n', 'c': 'n', 'R': 'n'}
let mode = get(map, mode()[0], mode()[0])
let bgcolor = {'n': [240, '#585858'], 'i': [31, '#0087af']}
@ -1211,7 +1211,7 @@ Problem 13: *lightline-problem-13*
Add the following settings to your .vimrc(_vimrc).
>
augroup LightLineColorscheme
augroup LightlineColorscheme
autocmd!
autocmd ColorScheme * call s:lightline_update()
augroup END

@ -1,4 +1,8 @@
Next
- Reuse/reopen existing window trees where possible #244
- Remove NERDTree.previousBuf()
- Change color of arrow (Leeiio) #630
- Improved a tip in README.markdown (ggicci) #628
- Shorten delete confimration of empty directory to 'y' (mikeperri) #530
- Fix API call to open directory tree in window (devm33) #533
- Change default arrows on non-Windows platforms (gwilk) #546

@ -101,15 +101,13 @@ Stick this in your vimrc:
Note: Now start vim with plain `vim`, not `vim .`
---
> How can I open NERDTree on startup, and have my cursor start in the other window?
> How can I open NERDTree automatically when vim starts up on opening a directory?
Stick this in your vimrc:
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
autocmd vimenter * NERDTree
autocmd vimenter * wincmd p
This window is tab-specific, meaning it's used by all windows in the tab. This trick also prevents NERDTree from hiding when first selecting a file.
*via [stackoverflow/Yohann](http://stackoverflow.com/questions/4277808/nerdtree-auto-focus-to-file-when-opened-in-new-tab/19330023#19330023)*
---
> How can I map a specific key or shortcut to open NERDTree?
@ -134,5 +132,5 @@ See here: https://github.com/scrooloose/nerdtree/issues/433#issuecomment-9259069
Use these variables in your vimrc. Note that below are default arrow symbols
let g:NERDTreeDirArrowExpandable = 'โ–บ'
let g:NERDTreeDirArrowCollapsible = 'โ–ผ'
let g:NERDTreeDirArrowExpandable = 'โ–ธ'
let g:NERDTreeDirArrowCollapsible = 'โ–พ'

@ -13,9 +13,37 @@ endfunction
"FUNCTION: nerdtree#checkForBrowse(dir) {{{2
"inits a window tree in the current buffer if appropriate
function! nerdtree#checkForBrowse(dir)
if a:dir != '' && isdirectory(a:dir)
call g:NERDTreeCreator.CreateWindowTree(a:dir)
if !isdirectory(a:dir)
return
endif
if s:reuseWin(a:dir)
return
endif
call g:NERDTreeCreator.CreateWindowTree(a:dir)
endfunction
"FUNCTION: s:reuseWin(dir) {{{2
"finds a NERDTree buffer with root of dir, and opens it.
function! s:reuseWin(dir) abort
let path = g:NERDTreePath.New(fnamemodify(a:dir, ":p"))
for i in range(1, bufnr("$"))
unlet! nt
let nt = getbufvar(i, "NERDTree")
if empty(nt)
continue
endif
if nt.isWinTree() && nt.root.path.equals(path)
call nt.setPreviousBuf(bufnr("#"))
exec "buffer " . i
return 1
endif
endfor
return 0
endfunction
" FUNCTION: nerdtree#completeBookmarks(A,L,P) {{{2

@ -186,6 +186,10 @@ function! s:NERDTree.previousBuf()
return self._previousBuf
endfunction
function! s:NERDTree.setPreviousBuf(bnum)
let self._previousBuf = a:bnum
endfunction
"FUNCTION: s:NERDTree.render() {{{1
"A convenience function - since this is called often
function! s:NERDTree.render()

@ -74,7 +74,7 @@ endfunction
function! s:promptToRenameBuffer(bufnum, msg, newFileName)
echo a:msg
if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y'
let quotedFileName = fnameescape(a:newFilename)
let quotedFileName = fnameescape(a:newFileName)
" 1. ensure that a new buffer is loaded
exec "badd " . quotedFileName
" 2. ensure that all windows which display the just deleted filename

@ -68,8 +68,8 @@ call s:initVariable("g:NERDTreeShowLineNumbers", 0)
call s:initVariable("g:NERDTreeSortDirs", 1)
if !nerdtree#runningWindows()
call s:initVariable("g:NERDTreeDirArrowExpandable", "โ–บ")
call s:initVariable("g:NERDTreeDirArrowCollapsible", "โ–ผ")
call s:initVariable("g:NERDTreeDirArrowExpandable", "โ–ธ")
call s:initVariable("g:NERDTreeDirArrowCollapsible", "โ–พ")
else
call s:initVariable("g:NERDTreeDirArrowExpandable", "+")
call s:initVariable("g:NERDTreeDirArrowCollapsible", "~")

@ -72,8 +72,8 @@ hi def link NERDTreeDir Directory
hi def link NERDTreeUp Directory
hi def link NERDTreeFile Normal
hi def link NERDTreeCWD Statement
hi def link NERDTreeOpenable Title
hi def link NERDTreeClosable Title
hi def link NERDTreeOpenable Directory
hi def link NERDTreeClosable Directory
hi def link NERDTreeIgnore ignore
hi def link NERDTreeRO WarningMsg
hi def link NERDTreeBookmark Statement

@ -26,20 +26,21 @@
4. [FAQ](#faq)
4.1. [I installed syntastic but it isn't reporting any errors...](#faqinfo)
4.2. [Syntastic supports several checkers for my filetype, how do I tell it which one(s) to use?](#faqcheckers)
4.3. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate)
4.4. [How can I pass additional arguments to a checker?](#faqargs)
4.5. [I run a checker and the location list is not updated...](#faqloclist)
4.5. [I run`:lopen` or `:lwindow` and the error window is empty...](#faqloclist)
4.6. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext)
4.7. [The error window is closed automatically when I `:quit` the current buffer but not when I `:bdelete` it?](#faqbdelete)
4.8. [My favourite checker needs to load a configuration file from the project's root rather than the current directory...](#faqconfig)
4.9. [What is the difference between syntax checkers and style checkers?](#faqstyle)
4.10. [How can I check scripts written for different versions of Python?](#faqpython)
4.11. [How can I check scripts written for different versions of Ruby?](#faqruby)
4.12. [The `perl` checker has stopped working...](#faqperl)
4.13. [What happened to the `rustc` checker?](#faqrust)
4.14. [What happened to the `tsc` checker?](#faqtsc)
4.15. [What happened to the `xcrun` checker?](#faqxcrun)
4.3. [How can I run checkers for "foreign" filetypes against the current file?](#faqforeign)
4.4. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate)
4.5. [How can I pass additional arguments to a checker?](#faqargs)
4.6. [I run a checker and the location list is not updated...](#faqloclist)
4.6. [I run`:lopen` or `:lwindow` and the error window is empty...](#faqloclist)
4.7. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext)
4.8. [The error window is closed automatically when I `:quit` the current buffer but not when I `:bdelete` it?](#faqbdelete)
4.9. [My favourite checker needs to load a configuration file from the project's root rather than the current directory...](#faqconfig)
4.10. [What is the difference between syntax checkers and style checkers?](#faqstyle)
4.11. [How can I check scripts written for different versions of Python?](#faqpython)
4.12. [How can I check scripts written for different versions of Ruby?](#faqruby)
4.13. [The `perl` checker has stopped working...](#faqperl)
4.14. [What happened to the `rustc` checker?](#faqrust)
4.15. [What happened to the `tsc` checker?](#faqtsc)
4.16. [What happened to the `xcrun` checker?](#faqxcrun)
5. [Resources](#otherresources)
- - -
@ -65,9 +66,9 @@ MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl
POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly
Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG,
reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog,
VHDL, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80, Zope
page templates, and Zsh. See the [manual][checkers] for details about the
Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL,
Vim help, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80,
Zope page templates, and Zsh. See the [manual][checkers] for details about the
corresponding supported checkers (`:help syntastic-checkers` in Vim).
A number of third-party Vim plugins also provide checkers for syntastic, for
@ -264,13 +265,36 @@ For example to run `phpcs` and `phpmd`:
```
This works for any checkers available for the current filetype, even if they
aren't listed in `g:syntastic_<filetype>_checkers`. You can't run checkers for
"foreign" filetypes though (e.g. you can't run, say, a Python checker if the
filetype of the current file is `php`).
aren't listed in `g:syntastic_<filetype>_checkers`.
<a name="faqforeign"></a>
__4.3. Q. How can I run checkers for "foreign" filetypes against the current
file?__
A. You need to qualify the name of the "foreign" checker with the name
of its filetype. For example to check `tex` files with the checker
`language_check` (which normally acts only on files of type `text`), you can
add `text/language_check` to the list fo checkers for `tex`:
```vim
let g:syntastic_tex_checkers = ['lacheck', 'text/language_check']
```
This also works with `:SyntasticCheck`, e.g. the following command runs
`text/language_check` against the current file regardless of the current
filetype:
```vim
:SyntasticCheck text/language_check
```
Of course, the checkers specified this way need to be known to syntastic, and
they need to be shown as available when you run `:SyntasticInfo`. You can't
just make up a combination of a filetype and a program name and expect it to
work as a checker.
<a name="faqaggregate"></a>
__4.3. Q. I have enabled multiple checkers for the current filetype. How can I
__4.4. Q. I have enabled multiple checkers for the current filetype. How can I
display all errors from all checkers together?__
A. Set `g:syntastic_aggregate_errors` to 1 in your `vimrc`:
@ -282,7 +306,7 @@ See `:help syntastic-aggregating-errors` for more details.
<a name="faqargs"></a>
__4.4. Q. How can I pass additional arguments to a checker?__
__4.5. Q. How can I pass additional arguments to a checker?__
A. In most cases a command line is constructed using an internal function
named `makeprgBuild()`, which provides a number of options that allow you to
@ -306,8 +330,8 @@ list of options should be included in the [manual][checkers]
<a name="faqloclist"></a>
__4.5. Q. I run a checker and the location list is not updated...__
__4.5. Q. I run`:lopen` or `:lwindow` and the error window is empty...__
__4.6. Q. I run a checker and the location list is not updated...__
__4.6. Q. I run`:lopen` or `:lwindow` and the error window is empty...__
A. By default the location list is changed only when you run the `:Errors`
command, in order to minimise conflicts with other plugins. If you want the
@ -319,7 +343,7 @@ let g:syntastic_always_populate_loc_list = 1
<a name="faqlnext"></a>
__4.6. Q. How can I jump between the different errors without using the location
__4.7. Q. How can I jump between the different errors without using the location
list at the bottom of the window?__
A. Vim provides several built-in commands for this. See `:help :lnext` and
@ -331,7 +355,7 @@ mappings (among other things).
<a name="faqbdelete"></a>
__4.7. Q. The error window is closed automatically when I `:quit` the current buffer
__4.8. Q. The error window is closed automatically when I `:quit` the current buffer
but not when I `:bdelete` it?__
A. There is no safe way to handle that situation automatically, but you can
@ -343,7 +367,7 @@ cabbrev <silent> bd <C-r>=(getcmdtype()==#':' && getcmdpos()==1 ? 'lclose\|bdele
<a name="faqconfig"></a>
__4.8. My favourite checker needs to load a configuration file from the
__4.9. My favourite checker needs to load a configuration file from the
project's root rather than the current directory...__
A. You can set up an `autocmd` to search for the configuration file in the
@ -363,7 +387,7 @@ autocmd FileType javascript let b:syntastic_javascript_jscs_args =
<a name="faqstyle"></a>
__4.9. Q. What is the difference between syntax checkers and style checkers?__
__4.10. Q. What is the difference between syntax checkers and style checkers?__
A. The errors and warnings they produce are highlighted differently and can
be filtered by different rules, but otherwise the distinction is pretty much
@ -393,7 +417,7 @@ See `:help syntastic_quiet_messages` for more information.
<a name="faqpython"></a>
__4.10. Q. How can I check scripts written for different versions of Python?__
__4.11. Q. How can I check scripts written for different versions of Python?__
A. Install a Python version manager such as [virtualenv][virtualenv]
or [pyenv][pyenv], activate the environment for the relevant version
@ -409,7 +433,7 @@ scripts.
<a name="faqruby"></a>
__4.11. Q. How can I check scripts written for different versions of Ruby?__
__4.12. Q. How can I check scripts written for different versions of Ruby?__
A. Install a Ruby version manager such as [rvm][rvm] or [rbenv][rbenv],
activate the environment for the relevant version of Ruby, and install in it
@ -424,7 +448,7 @@ scripts.
<a name="faqperl"></a>
__4.12. Q. The `perl` checker has stopped working...__
__4.13. Q. The `perl` checker has stopped working...__
A. The `perl` checker runs `perl -c` against your file, which in turn
__executes__ any `BEGIN`, `UNITCHECK`, and `CHECK` blocks, and any `use`
@ -440,14 +464,14 @@ let g:syntastic_enable_perl_checker = 1
<a name="faqrust"></a>
__4.13. Q. What happened to the `rustc` checker?__
__4.14. Q. What happened to the `rustc` checker?__
A. It is now part of the [rust.vim][rust] plugin. If you install this plugin the
checker should be picked up automatically by syntastic.
<a name="faqtsc"></a>
__4.14. Q. What happened to the `tsc` checker?__
__4.15. Q. What happened to the `tsc` checker?__
A. It didn't meet people's expectations and it has been removed. The plugin
[tsuquyomi][tsuquyomi] comes packaged with a checker for TypeScript. If you
@ -455,7 +479,7 @@ install this plugin the checker should be picked up automatically by syntastic.
<a name="faqxcrun"></a>
__4.15. Q. What happened to the `xcrun` checker?__
__4.16. Q. What happened to the `xcrun` checker?__
A. The `xcrun` checker used to have a security problem and it has been removed.
A better checker for __Swift__ is part of the [vim-swift][swift] plugin. If you

@ -21,7 +21,7 @@ function! syntastic#log#warn(msg) abort " {{{2
endfunction " }}}2
function! syntastic#log#error(msg) abort " {{{2
execute "normal \<Esc>"
execute 'normal! \<Esc>'
echohl ErrorMsg
echomsg 'syntastic: error: ' . a:msg
echohl None
@ -68,7 +68,7 @@ function! syntastic#log#debug(level, msg, ...) abort " {{{2
let leader = s:_log_timestamp()
call s:_logRedirect(1)
if a:0 > 0
if a:0
" filter out dictionary functions
echomsg leader . a:msg . ' ' .
\ strtrans(string(type(a:1) == type({}) || type(a:1) == type([]) ?

@ -102,6 +102,10 @@ function! syntastic#util#rmrf(what) abort " {{{2
endif
endfunction " }}}2
function! syntastic#util#getbufvar(buf, name, ...) abort " {{{2
return a:0 ? s:_getbufvar(a:buf, a:name, a:1) : getbufvar(a:buf, a:name)
endfunction " }}}2
" Search the first 5 lines of the file for a magic number and return a map
" containing the args and the executable
"
@ -126,9 +130,19 @@ function! syntastic#util#parseShebang() abort " {{{2
return { 'exe': '', 'args': [] }
endfunction " }}}2
" Get the value of a Vim variable. Allow buffer variables to override global ones.
function! syntastic#util#bufRawVar(buf, name, ...) abort " {{{2
return s:_getbufvar(a:buf, a:name, get(g:, a:name, a:0 ? a:1 : ''))
endfunction "}}}2
" Get the value of a syntastic variable. Allow buffer variables to override global ones.
function! syntastic#util#bufVar(buf, name, ...) abort " {{{2
return call('syntastic#util#bufRawVar', [a:buf, 'syntastic_' . a:name] + a:000)
endfunction "}}}2
" Get the value of a Vim variable. Allow local variables to override global ones.
function! syntastic#util#rawVar(name, ...) abort " {{{2
return get(b:, a:name, get(g:, a:name, a:0 > 0 ? a:1 : ''))
return get(b:, a:name, get(g:, a:name, a:0 ? a:1 : ''))
endfunction " }}}2
" Get the value of a syntastic variable. Allow local variables to override global ones.
@ -165,11 +179,6 @@ function! syntastic#util#compareLexi(a, b) abort " {{{2
return 0
endfunction " }}}2
" strwidth() was added in Vim 7.3; if it doesn't exist, we use strlen()
" and hope for the best :)
let s:_width = function(exists('*strwidth') ? 'strwidth' : 'strlen')
lockvar s:_width
function! syntastic#util#screenWidth(str, tabstop) abort " {{{2
let chunks = split(a:str, "\t", 1)
let width = s:_width(chunks[-1])
@ -391,9 +400,6 @@ function! syntastic#util#setWids() abort " {{{2
endfor
endfunction " }}}2
let s:_str2float = function(exists('*str2float') ? 'str2float' : 'str2nr')
lockvar s:_str2float
function! syntastic#util#str2float(val) abort " {{{2
return s:_str2float(a:val)
endfunction " }}}2
@ -515,6 +521,11 @@ function! s:_translateElement(key, term) abort " {{{2
return ret
endfunction " }}}2
" strwidth() was added in Vim 7.3; if it doesn't exist, we use strlen()
" and hope for the best :)
let s:_width = function(exists('*strwidth') ? 'strwidth' : 'strlen')
lockvar s:_width
" @vimlint(EVL103, 1, a:flags)
function! s:_delete_dumb(what, flags) abort " {{{2
if !exists('s:rmrf')
@ -561,6 +572,9 @@ function! s:_rmrf(what) abort " {{{2
endif
endfunction " }}}2
let s:_str2float = function(exists('*str2float') ? 'str2float' : 'str2nr')
lockvar s:_str2float
function! s:_float2str_smart(val) abort " {{{2
return printf('%.1f', a:val)
endfunction " }}}2
@ -572,6 +586,18 @@ endfunction " }}}2