From d0783b7b543416bb946af78a69c7fd8627d6da6b Mon Sep 17 00:00:00 2001 From: Vignesh D Date: Sun, 27 Nov 2016 22:26:31 +0530 Subject: [PATCH 1/7] Update README.md to change the url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 489ec5f9..1cf7b471 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ I would of course recommend using the awesome version.c ## How to install the Awesome version? The awesome version includes a lot of great plugins, configurations and color schemes that make Vim a lot better. To install it simply do following: - git clone https://github.com/amix/vimrc.git ~/.vim_runtime + git clone https://github.com/vignesh0025/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_awesome_vimrc.sh I also recommend using [Source Code Pro font from Adobe](http://store1.adobe.com/cfusion/store/html/index.cfm?event=displayFontPackage&code=1960) (it's free and awesome font for writing and programming). The Awesome vimrc is already setup to try to use it From e858942896ef8c868934395f7f8cd9fcacc860e8 Mon Sep 17 00:00:00 2001 From: Vignesh D Date: Sun, 27 Nov 2016 22:27:00 +0530 Subject: [PATCH 2/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1cf7b471..f83a62f2 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The basic version is basically just one file and no plugins. You can check out [ This is useful to install on remote servers where you don't need many plugins and you don't do many edits. - git clone git://github.com/amix/vimrc.git ~/.vim_runtime + git clone git://github.com/vignesh0025/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_basic_vimrc.sh From 2091a877b145dea932fcb5c7ee8ee93048ddcbdc Mon Sep 17 00:00:00 2001 From: Vignesh Date: Mon, 28 Nov 2016 21:34:59 +0530 Subject: [PATCH 3/7] Added my_config and powerline font --- .gitignore | 2 +- Sauce Code Powerline Medium.otf | Bin 0 -> 93160 bytes my_configs.vim | 292 +++++++++++++++++++++++++ sources_non_forked/nerdcommenter | 1 + sources_non_forked/nerdtree-git-plugin | 1 + sources_non_forked/vim-devicons | 1 + sources_non_forked/vim-easymotion | 1 + sources_non_forked/vim-signify | 1 + 8 files changed, 298 insertions(+), 1 deletion(-) create mode 100644 Sauce Code Powerline Medium.otf create mode 100755 my_configs.vim create mode 160000 sources_non_forked/nerdcommenter create mode 160000 sources_non_forked/nerdtree-git-plugin create mode 160000 sources_non_forked/vim-devicons create mode 160000 sources_non_forked/vim-easymotion create mode 160000 sources_non_forked/vim-signify diff --git a/.gitignore b/.gitignore index 56dee29f..a728c9c9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,6 @@ temp_dirs/yankring_history_v2.txt sources_forked/yankring/doc/tags sources_non_forked/tlib/doc/tags sources_non_forked/ctrlp.vim/doc/tags* -my_configs.vim tags .DS_Store +.idea/* diff --git a/Sauce Code Powerline Medium.otf b/Sauce Code Powerline Medium.otf new file mode 100644 index 0000000000000000000000000000000000000000..9b8be219ed7db96446755e76f0ca8f8a89199ed0 GIT binary patch literal 93160 zcmd?S349Y(_b@z5lBQ{!E@`Tww4v|IhQbfXJphqO)GK-!cfrECJC2r>%D zCZKF8`wp@rpdcs+E+A`>UBLxJ(HjiHch0>DX%(O6d7t-v|G(e&ebmmqGjs3R?>T4Y zo~bzn1v#9Wo5+dW(3IqSz0`b849AyT=Qu7mH9cKtxEPktap?~@UbvK=UXWEjV7!du zOWVQy=enoq)02)SOy>BEIyis7du~qty!P_x!??js2gm=J=j7;e1_A ze%n}E+?NA5j?abhLrW?R)wAvdwc)sKdpS-KT46Ml{<&!1M7Z}O{3cYu1;r%p8yMdV z&YM+K+DEP0v+P5_5A(g|R~klDi$@U@-vbVcDnq65{pqcrhVxAv*VVV$VzWQm$;AQv zNS}`5aj2|+R>7GIL;O4a#`%ah;R<&`*|D#?eYEajweXRw37jiA0k6V8m?sN-c!%SJ zqDSi<%@sbPkk~zTgps+Ncoa@Vp@_f7$zkj?0ipI{EkBrx<#lk?NA4}kL_v_ji5JH` zjWp4J$!RHit{bOw3c~G23dG0<4(0gSc$2>+%;0qJ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?`8t{`%v6Cd&N%q7DVVt<5LNPy9=p*af9;CBE z6T2vMu!lkidxH0LA-%v8`Y9t;ixqt}dO8KPMvKxw9l*sClufX6CD^fA`q=t?tissO zvbN}g(a6q4*{KT0WoqWbf2mmye>3+Z?(@p-+YKR(TM3_WPmKPsd&xL;;;`Sf!#gSG z9pIPPUi}lil?!IpD5QLX92}RU_^ghW8S$YK-mmyR^cW}cpLMT_G)P^c>p+B zH}Wgzhqhp|?F&BduV$P1{amZOUt7&RRs+oui?5uX;AHOqUrqk+tSSHd3SwQt|BEXK zMib+I*;>p-E5Tf1UlZ(!W@7O8sF{nWlU&vW94d>SGIE{A4o?#qLwta~+IJ1^; zgK$>d7i-TI+)c#&3D}o9AzvWk+(;zm^T#;*9;>)nIA4ekr zPsweR984x+rtidAxhGsV(g)>yhVU4yh=GVDu zvD!zVM_#Idm-El^dOTI_$zRDix0@92D#dO3QC7|w=zt{gl zy&}!Ov3Lvivs2!|3D0D|0G#LzG5?z2&D>GTH^15l_c8y*;2G?v*1sFB?B@D~wB^ubA_4~bH);IUD^H|_)U33Eg6M(=Xf(OXSW8tdzr|DMH}D8`m43MnisOr4JbtUuYi)5Ry`CHe@9Ky?*{RIgJhX4VGIuY-PbC+W zST>uj@2p4b4Z#>_0cz3(bJ`96hhlC_0wt*a`X$P1sLXaY+5PK)YuyWFuE0lKgjBXkGo%_fCv6yq9* mG5ipBEx%1ls0dWU;xd)}+D?pP)n(! literal 0 HcmV?d00001 diff --git a/my_configs.vim b/my_configs.vim new file mode 100755 index 00000000..d2bd4171 --- /dev/null +++ b/my_configs.vim @@ -0,0 +1,292 @@ +set cmdheight=1 +nmap q :q + +set gfn=Source\ Code\ Pro\ for\ Powerline\ Medium\ 11 +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Nerd Tree Config +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif +map :NERDTreeToggle + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Syntastic +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:syntastic_asm_checkers = ['nasm'] + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Airline Theme +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:airline_theme='molokai' +let g:airline_powerline_fonts = 1 + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => vim-color-solarised +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if has("mac") || has("macunix") + let g:solarized_termcolors=256 +endif + +syntax enable +set background=dark +colorscheme solarized + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"LightLine +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +"let g:lightline = { + "\ 'active': { + "\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], + "\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] + "\ }, + "\ 'component_function': { + "\ 'fugitive': 'LightLineFugitive', + "\ 'filename': 'LightLineFilename', + "\ 'fileformat': 'LightLineFileformat', + "\ 'filetype': 'LightLineFiletype', + "\ 'fileencoding': 'LightLineFileencoding', + "\ 'mode': 'LightLineMode', + "\ 'ctrlpmark': 'CtrlPMark', + "\ }, + "\ 'component_expand': { + "\ 'syntastic': 'SyntasticStatuslineFlag', + "\ }, + "\ 'component_type': { + "\ 'syntastic': 'error', + "\ }, + "\ 'separator': { 'left': '', 'right': '' }, + "\ 'subseparator': { 'left': '\ue0b1', 'right': '\ueb03' } + "\ } + +"function! LightLineModified() + "return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' +"endfunction + +"function! LightLineReadonly() + "return &ft !~? 'help' && &readonly ? '' : '' +"endfunction + +"function! LightLineFilename() + "let fname = expand('%:t') + "return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item : + "\ fname == '__Tagbar__' ? g:lightline.fname : + "\ fname =~ '__Gundo\|NERD_tree' ? '' : + "\ &ft == 'vimfiler' ? vimfiler#get_status_string() : + "\ &ft == 'unite' ? unite#get_status_string() : + "\ &ft == 'vimshell' ? vimshell#get_status_string() : + "\ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . + "\ ('' != fname ? fname : '[No Name]') . + "\ ('' != LightLineModified() ? ' ' . LightLineModified() : '') +"endfunction + +"function! LightLineFugitive() + "try + "if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') + "let mark = '' + "let branch = fugitive#head() + "return branch !=# '' ? mark.branch : '' + "endif + "catch + "endtry + "return '' + "endfunction + + "function! LightLineFileformat() + "return winwidth(0) > 70 ? &fileformat . ' ' . WebDevIconsGetFileFormatSymbol() : '' + "endfunction + + "function! LightLineFiletype() + "return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype. ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' + "endfunction + + "function! LightLineFileencoding() + "return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : '' + "endfunction + + "function! LightLineMode() + "let fname = expand('%:t') + "return fname == '__Tagbar__' ? 'Tagbar' : + "\ fname == 'ControlP' ? 'CtrlP' : + "\ fname == '__Gundo__' ? 'Gundo' : + "\ fname == '__Gundo_Preview__' ? 'Gundo Preview' : + "\ fname =~ 'NERD_tree' ? 'NERDTree' : + "\ &ft == 'unite' ? 'Unite' : + "\ &ft == 'vimfiler' ? 'VimFiler' : + "\ &ft == 'vimshell' ? 'VimShell' : + "\ winwidth(0) > 60 ? lightline#mode() : '' + "endfunction + "function! CtrlPMark() + "if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item') + "call lightline#link('iR'[g:lightline.ctrlp_regex]) + "return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item + "\ , g:lightline.ctrlp_next], 0) + "else + "return '' + "endif +"endfunction + +"let g:ctrlp_status_func = { +"\ 'main': 'CtrlPStatusFunc_1', +"\ 'prog': 'CtrlPStatusFunc_2', +"\ } + +"function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked) +"let g:lightline.ctrlp_regex = a:regex +"let g:lightline.ctrlp_prev = a:prev +"let g:lightline.ctrlp_item = a:item +"let g:lightline.ctrlp_next = a:next +"return lightline#statusline(0) +"endfunction + +"function! CtrlPStatusFunc_2(str) +"return lightline#statusline(0) +"endfunction +"let g:tagbar_status_func = 'TagbarStatusFunc' + +"function! TagbarStatusFunc(current, sort, fname, ...) abort + "let g:lightline.fname = a:fname + "return lightline#statusline(0) +"endfunction + +"augroup AutoSyntastic +"autocmd! +"autocmd BufWritePost *.c,*.cpp call s:syntastic() +"augroup END +"function! s:syntastic() +"SyntasticCheck +"call lightline#update() +"endfunction + +"let g:unite_force_overwrite_statusline = 0 +"let g:vimfiler_force_overwrite_statusline = 0 +"let g:vimshell_force_overwrite_statusline = 0 + +let g:lightline = { + \ 'colorscheme': 'landscape', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], + \ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ }, + \ 'component_function': { + \ 'fugitive': 'LightlineFugitive', + \ 'filename': 'LightlineFilename', + \ 'fileformat': 'LightlineFileformat', + \ 'filetype': 'LightlineFiletype', + \ 'fileencoding': 'LightlineFileencoding', + \ 'mode': 'LightlineMode', + \ 'ctrlpmark': 'CtrlPMark', + \ }, + \ 'component_expand': { + \ 'syntastic': 'SyntasticStatuslineFlag', + \ }, + \ 'component_type': { + \ 'syntastic': 'error', + \ }, + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '\ue0b1', 'right': '\ue0b3' } + \ } + +function! LightlineModified() + return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' +endfunction + +function! LightlineReadonly() + return &ft !~? 'help' && &readonly ? '' : '' +endfunction + +function! LightlineFilename() + let fname = expand('%:t') + return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item : + \ fname == '__Tagbar__' ? g:lightline.fname : + \ fname =~ '__Gundo\|NERD_tree' ? '' : + \ &ft == 'vimfiler' ? vimfiler#get_status_string() : + \ &ft == 'unite' ? unite#get_status_string() : + \ &ft == 'vimshell' ? vimshell#get_status_string() : + \ ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . + \ ('' != fname ? fname : '[No Name]') . + \ ('' != LightlineModified() ? ' ' . LightlineModified() : '') +endfunction + +function! LightlineFugitive() + try + if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') + let mark = '' " edit here for cool mark + let branch = fugitive#head() + return branch !=# '' ? mark.branch : '' + endif + catch + endtry + return '' +endfunction + +function! LightlineFileformat() + return winwidth(0) > 70 ? &fileformat : '' +endfunction + +function! LightlineFiletype() + return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : '' +endfunction + +function! LightlineFileencoding() + return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : '' +endfunction + +function! LightlineMode() + let fname = expand('%:t') + return fname == '__Tagbar__' ? 'Tagbar' : + \ fname == 'ControlP' ? 'CtrlP' : + \ fname == '__Gundo__' ? 'Gundo' : + \ fname == '__Gundo_Preview__' ? 'Gundo Preview' : + \ fname =~ 'NERD_tree' ? 'NERDTree' : + \ &ft == 'unite' ? 'Unite' : + \ &ft == 'vimfiler' ? 'VimFiler' : + \ &ft == 'vimshell' ? 'VimShell' : + \ winwidth(0) > 60 ? lightline#mode() : '' +endfunction + +function! CtrlPMark() + if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item') + call lightline#link('iR'[g:lightline.ctrlp_regex]) + return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item + \ , g:lightline.ctrlp_next], 0) + else + return '' + endif +endfunction + +let g:ctrlp_status_func = { + \ 'main': 'CtrlPStatusFunc_1', + \ 'prog': 'CtrlPStatusFunc_2', + \ } + +function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked) + let g:lightline.ctrlp_regex = a:regex + let g:lightline.ctrlp_prev = a:prev + let g:lightline.ctrlp_item = a:item + let g:lightline.ctrlp_next = a:next + return lightline#statusline(0) +endfunction + +function! CtrlPStatusFunc_2(str) + return lightline#statusline(0) +endfunction + +let g:tagbar_status_func = 'TagbarStatusFunc' + +function! TagbarStatusFunc(current, sort, fname, ...) abort + let g:lightline.fname = a:fname + return lightline#statusline(0) +endfunction + +augroup AutoSyntastic + autocmd! + autocmd BufWritePost *.c,*.cpp call s:syntastic() +augroup END +function! s:syntastic() + SyntasticCheck + call lightline#update() +endfunction + +let g:unite_force_overwrite_statusline = 0 +let g:vimfiler_force_overwrite_statusline = 0 +let g:vimshell_force_overwrite_statusline = 0 diff --git a/sources_non_forked/nerdcommenter b/sources_non_forked/nerdcommenter new file mode 160000 index 00000000..057f6150 --- /dev/null +++ b/sources_non_forked/nerdcommenter @@ -0,0 +1 @@ +Subproject commit 057f6150bdb11124bcb63e85f5445fae47f383c3 diff --git a/sources_non_forked/nerdtree-git-plugin b/sources_non_forked/nerdtree-git-plugin new file mode 160000 index 00000000..1d9e187e --- /dev/null +++ b/sources_non_forked/nerdtree-git-plugin @@ -0,0 +1 @@ +Subproject commit 1d9e187e76e71466deb14b8b1c546f64f8090a63 diff --git a/sources_non_forked/vim-devicons b/sources_non_forked/vim-devicons new file mode 160000 index 00000000..4fbf39a8 --- /dev/null +++ b/sources_non_forked/vim-devicons @@ -0,0 +1 @@ +Subproject commit 4fbf39a8984ed9a450b5cd078d65955de472bace diff --git a/sources_non_forked/vim-easymotion b/sources_non_forked/vim-easymotion new file mode 160000 index 00000000..11632455 --- /dev/null +++ b/sources_non_forked/vim-easymotion @@ -0,0 +1 @@ +Subproject commit 11632455de8caa40f264501df8f0a3e249cf0595 diff --git a/sources_non_forked/vim-signify b/sources_non_forked/vim-signify new file mode 160000 index 00000000..fa505310 --- /dev/null +++ b/sources_non_forked/vim-signify @@ -0,0 +1 @@ +Subproject commit fa5053105fe43bfa90b18052ad58a685c2313675 From 3a2529b801d0e3dac7a7a39facfa7711d0192ff1 Mon Sep 17 00:00:00 2001 From: vignesh Date: Mon, 28 Nov 2016 22:03:51 +0530 Subject: [PATCH 4/7] Added windows font --- my_configs.vim | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/my_configs.vim b/my_configs.vim index d2bd4171..ec24cb3e 100755 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,8 +1,19 @@ set cmdheight=1 nmap q :q -set gfn=Source\ Code\ Pro\ for\ Powerline\ Medium\ 11 -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if has("mac") || has("macunix") + set gfn=Hack:h14,Source\ Code\ Pro:h15,Menlo:h15 +elseif has("win16") || has("win32") + set gfn=Source_Code_Pro_Medium:h12,Bitstream\ Vera\ Sans\ Mono:h11 +elseif has("gui_gtk2") + set gfn=Hack\ 14,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 +elseif has("linux") + set gfn=Source\ Code\ Pro\ for\ Powerline\ Medium\ 11 +elseif has("unix") + set gfn=Monospace\ 11 +endif + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Nerd Tree Config """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif From 972880f19ea861c5a70128294b466adaf50f6c03 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Sun, 18 Dec 2016 15:10:28 +0530 Subject: [PATCH 5/7] Set system clipboard as def --- my_configs.vim | 136 ++----------------------------------------------- 1 file changed, 4 insertions(+), 132 deletions(-) diff --git a/my_configs.vim b/my_configs.vim index ec24cb3e..c4515b1c 100755 --- a/my_configs.vim +++ b/my_configs.vim @@ -6,7 +6,7 @@ if has("mac") || has("macunix") elseif has("win16") || has("win32") set gfn=Source_Code_Pro_Medium:h12,Bitstream\ Vera\ Sans\ Mono:h11 elseif has("gui_gtk2") - set gfn=Hack\ 14,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 + set gfn=Source\ Code\ Pro\ for\ Powerline\ Medium\ 11 elseif has("linux") set gfn=Source\ Code\ Pro\ for\ Powerline\ Medium\ 11 elseif has("unix") @@ -41,137 +41,6 @@ syntax enable set background=dark colorscheme solarized -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -"LightLine -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -"let g:lightline = { - "\ 'active': { - "\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], - "\ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] - "\ }, - "\ 'component_function': { - "\ 'fugitive': 'LightLineFugitive', - "\ 'filename': 'LightLineFilename', - "\ 'fileformat': 'LightLineFileformat', - "\ 'filetype': 'LightLineFiletype', - "\ 'fileencoding': 'LightLineFileencoding', - "\ 'mode': 'LightLineMode', - "\ 'ctrlpmark': 'CtrlPMark', - "\ }, - "\ 'component_expand': { - "\ 'syntastic': 'SyntasticStatuslineFlag', - "\ }, - "\ 'component_type': { - "\ 'syntastic': 'error', - "\ }, - "\ 'separator': { 'left': '', 'right': '' }, - "\ 'subseparator': { 'left': '\ue0b1', 'right': '\ueb03' } - "\ } - -"function! LightLineModified() - "return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' -"endfunction - -"function! LightLineReadonly() - "return &ft !~? 'help' && &readonly ? '' : '' -"endfunction - -"function! LightLineFilename() - "let fname = expand('%:t') - "return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item : - "\ fname == '__Tagbar__' ? g:lightline.fname : - "\ fname =~ '__Gundo\|NERD_tree' ? '' : - "\ &ft == 'vimfiler' ? vimfiler#get_status_string() : - "\ &ft == 'unite' ? unite#get_status_string() : - "\ &ft == 'vimshell' ? vimshell#get_status_string() : - "\ ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . - "\ ('' != fname ? fname : '[No Name]') . - "\ ('' != LightLineModified() ? ' ' . LightLineModified() : '') -"endfunction - -"function! LightLineFugitive() - "try - "if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') - "let mark = '' - "let branch = fugitive#head() - "return branch !=# '' ? mark.branch : '' - "endif - "catch - "endtry - "return '' - "endfunction - - "function! LightLineFileformat() - "return winwidth(0) > 70 ? &fileformat . ' ' . WebDevIconsGetFileFormatSymbol() : '' - "endfunction - - "function! LightLineFiletype() - "return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype. ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' - "endfunction - - "function! LightLineFileencoding() - "return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : '' - "endfunction - - "function! LightLineMode() - "let fname = expand('%:t') - "return fname == '__Tagbar__' ? 'Tagbar' : - "\ fname == 'ControlP' ? 'CtrlP' : - "\ fname == '__Gundo__' ? 'Gundo' : - "\ fname == '__Gundo_Preview__' ? 'Gundo Preview' : - "\ fname =~ 'NERD_tree' ? 'NERDTree' : - "\ &ft == 'unite' ? 'Unite' : - "\ &ft == 'vimfiler' ? 'VimFiler' : - "\ &ft == 'vimshell' ? 'VimShell' : - "\ winwidth(0) > 60 ? lightline#mode() : '' - "endfunction - "function! CtrlPMark() - "if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item') - "call lightline#link('iR'[g:lightline.ctrlp_regex]) - "return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item - "\ , g:lightline.ctrlp_next], 0) - "else - "return '' - "endif -"endfunction - -"let g:ctrlp_status_func = { -"\ 'main': 'CtrlPStatusFunc_1', -"\ 'prog': 'CtrlPStatusFunc_2', -"\ } - -"function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked) -"let g:lightline.ctrlp_regex = a:regex -"let g:lightline.ctrlp_prev = a:prev -"let g:lightline.ctrlp_item = a:item -"let g:lightline.ctrlp_next = a:next -"return lightline#statusline(0) -"endfunction - -"function! CtrlPStatusFunc_2(str) -"return lightline#statusline(0) -"endfunction -"let g:tagbar_status_func = 'TagbarStatusFunc' - -"function! TagbarStatusFunc(current, sort, fname, ...) abort - "let g:lightline.fname = a:fname - "return lightline#statusline(0) -"endfunction - -"augroup AutoSyntastic -"autocmd! -"autocmd BufWritePost *.c,*.cpp call s:syntastic() -"augroup END -"function! s:syntastic() -"SyntasticCheck -"call lightline#update() -"endfunction - -"let g:unite_force_overwrite_statusline = 0 -"let g:vimfiler_force_overwrite_statusline = 0 -"let g:vimshell_force_overwrite_statusline = 0 - let g:lightline = { \ 'colorscheme': 'landscape', \ 'active': { @@ -301,3 +170,6 @@ endfunction let g:unite_force_overwrite_statusline = 0 let g:vimfiler_force_overwrite_statusline = 0 let g:vimshell_force_overwrite_statusline = 0 +map h :noh + +set clipboard=unnamedplus From b3ea8941ac890b7effcd216e008da60f740efae0 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Fri, 23 Dec 2016 15:18:35 +0530 Subject: [PATCH 6/7] Updated plugins --- .../ctrlp.vim/autoload/ctrlp.vim | 47 +- sources_non_forked/ctrlp.vim/doc/ctrlp.cnx | 3 +- sources_non_forked/ctrlp.vim/doc/ctrlp.txt | 25 +- sources_non_forked/ctrlp.vim/plugin/ctrlp.vim | 2 +- sources_non_forked/lightline.vim/README.md | 104 +-- .../lightline.vim/autoload/lightline.vim | 34 +- .../lightline/colorscheme/Dracula.vim | 36 + .../lightline/colorscheme/molokai.vim | 36 + .../autoload/lightline/colorscheme/one.vim | 63 ++ .../lightline.vim/doc/lightline.txt | 120 ++-- .../lightline.vim/test/highlight.vim | 120 ++-- .../lightline.vim/test/link.vim | 110 +-- sources_non_forked/nerdtree/CHANGELOG | 4 + sources_non_forked/nerdtree/README.markdown | 14 +- .../nerdtree/autoload/nerdtree.vim | 32 +- .../nerdtree/lib/nerdtree/nerdtree.vim | 4 + .../nerdtree/nerdtree_plugin/fs_menu.vim | 2 +- .../nerdtree/plugin/NERD_tree.vim | 4 +- .../nerdtree/syntax/nerdtree.vim | 4 +- sources_non_forked/syntastic/CONTRIBUTING.md | 8 +- sources_non_forked/syntastic/README.markdown | 114 +-- .../syntastic/autoload/syntastic/log.vim | 4 +- .../syntastic/autoload/syntastic/util.vim | 64 +- .../syntastic/doc/syntastic-checkers.txt | 325 ++++++++- .../syntastic/doc/syntastic.txt | 85 ++- .../syntastic/plugin/syntastic.vim | 74 +- .../syntastic/plugin/syntastic/checker.vim | 47 +- .../syntastic/plugin/syntastic/loclist.vim | 8 +- .../syntastic/plugin/syntastic/modemap.vim | 11 +- .../syntastic/plugin/syntastic/registry.vim | 103 ++- .../syntax_checkers/asciidoc/proselint.vim | 23 + .../syntax_checkers/haskell/ghc-mod.vim | 94 --- .../syntax_checkers/help/proselint.vim | 23 + .../syntax_checkers/html/htmlhint.vim | 46 ++ .../syntax_checkers/html/proselint.vim | 23 + .../syntax_checkers/markdown/proselint.vim | 23 + .../syntastic/syntax_checkers/nasm/nasm.vim | 2 +- .../syntax_checkers/nroff/proselint.vim | 23 + .../syntax_checkers/pod/proselint.vim | 23 + .../syntax_checkers/rst/proselint.vim | 23 + .../syntax_checkers/stylus/stylint.vim | 22 +- .../syntax_checkers/tex/proselint.vim | 23 + .../syntax_checkers/texinfo/proselint.vim | 23 + .../syntax_checkers/text/proselint.vim | 45 ++ .../syntastic/syntax_checkers/vim/vimlint.vim | 3 +- .../syntax_checkers/xhtml/proselint.vim | 23 + sources_non_forked/vim-flake8/README.mdown | 14 + .../vim-fugitive/plugin/fugitive.vim | 10 +- .../vim-go/.github/ISSUE_TEMPLATE.md | 22 +- sources_non_forked/vim-go/CHANGELOG.md | 134 +++- sources_non_forked/vim-go/LICENSE | 2 + sources_non_forked/vim-go/README.md | 13 +- .../vim-go/autoload/ctrlp/decls.vim | 12 +- .../vim-go/autoload/go/alternate.vim | 2 +- .../vim-go/autoload/go/asmfmt.vim | 16 +- sources_non_forked/vim-go/autoload/go/cmd.vim | 210 ++++-- .../vim-go/autoload/go/complete.vim | 27 +- .../vim-go/autoload/go/coverage.vim | 129 +++- sources_non_forked/vim-go/autoload/go/def.vim | 155 +++-- sources_non_forked/vim-go/autoload/go/doc.vim | 205 +++--- sources_non_forked/vim-go/autoload/go/fmt.vim | 6 +- .../vim-go/autoload/go/guru.vim | 648 ++++++++++++------ .../vim-go/autoload/go/impl.vim | 10 +- .../vim-go/autoload/go/import.vim | 4 +- sources_non_forked/vim-go/autoload/go/job.vim | 109 +++ .../vim-go/autoload/go/jobcontrol.vim | 85 +-- .../vim-go/autoload/go/lint.vim | 141 +++- .../vim-go/autoload/go/list.vim | 25 +- .../vim-go/autoload/go/package.vim | 10 +- .../vim-go/autoload/go/path.vim | 14 +- .../vim-go/autoload/go/play.vim | 8 +- .../vim-go/autoload/go/rename.vim | 109 ++- .../vim-go/autoload/go/statusline.vim | 112 +++ .../vim-go/autoload/go/template.vim | 16 +- .../vim-go/autoload/go/term.vim | 17 +- .../vim-go/autoload/go/textobj.vim | 4 +- .../vim-go/autoload/go/tool.vim | 32 +- sources_non_forked/vim-go/autoload/go/ui.vim | 8 +- .../vim-go/autoload/go/util.vim | 132 ++-- sources_non_forked/vim-go/doc/vim-go.txt | 101 ++- sources_non_forked/vim-go/ftplugin/go.vim | 70 +- .../vim-go/ftplugin/go/commands.vim | 6 +- .../vim-go/ftplugin/go/mappings.vim | 7 +- .../vim-go/indent/gohtmltmpl.vim | 4 +- sources_non_forked/vim-go/plugin/go.vim | 14 +- sources_non_forked/vim-go/syntax/go.vim | 15 +- sources_non_forked/vim-pug/syntax/pug.vim | 8 +- .../vim-snipmate/autoload/snipMate.vim | 66 +- .../doc/{snipMate.txt => SnipMate.txt} | 0 sources_non_forked/vim-snippets/AUTHORS | 383 +++++++++++ .../vim-snippets/UltiSnips/all.snippets | 4 +- .../vim-snippets/UltiSnips/cuda.snippets | 5 + .../vim-snippets/UltiSnips/html.snippets | 6 +- .../UltiSnips/javascript.snippets | 10 - .../UltiSnips/php-laravel.snippets | 8 +- .../UltiSnips/php-symfony2.snippets | 2 +- .../vim-snippets/UltiSnips/python.snippets | 5 + .../vim-snippets/UltiSnips/tex.snippets | 4 +- .../vim-snippets/pythonx/vimsnippets.py | 2 +- .../vim-snippets/snippets/_.snippets | 8 + .../vim-snippets/snippets/arduino.snippets | 32 +- .../vim-snippets/snippets/c.snippets | 10 +- .../vim-snippets/snippets/cuda.snippets | 1 + .../vim-snippets/snippets/elixir.snippets | 4 + .../vim-snippets/snippets/fortran.snippets | 21 +- .../vim-snippets/snippets/handlebars.snippets | 14 + .../vim-snippets/snippets/html.snippets | 2 + .../vim-snippets/snippets/java.snippets | 8 + ...n.snippets => javascript-bemjson.snippets} | 2 +- ...ipt.d3.snippets => javascript-d3.snippets} | 0 .../snippets/javascript-mocha.snippets | 4 + .../snippets/javascript.es6.react.snippets | 81 +++ .../javascript/javascript-react.snippets | 83 +++ .../javascript/javascript.es6.snippets | 31 +- .../javascript/javascript.node.snippets | 2 +- .../snippets/javascript/javascript.snippets | 19 +- .../vim-snippets/snippets/mustache.snippets | 9 +- .../vim-snippets/snippets/php.snippets | 12 +- .../vim-snippets/snippets/ps1.snippets | 58 ++ .../vim-snippets/snippets/purescript.snippets | 52 ++ .../vim-snippets/snippets/rails.snippets | 2 +- .../vim-snippets/snippets/stylus.snippets | 4 + .../vim-snippets/snippets/tex.snippets | 299 ++++---- 123 files changed, 4421 insertions(+), 1547 deletions(-) create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Dracula.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/molokai.vim create mode 100644 sources_non_forked/lightline.vim/autoload/lightline/colorscheme/one.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/asciidoc/proselint.vim delete mode 100644 sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/help/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/htmlhint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/html/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/markdown/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/nroff/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/pod/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/rst/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/tex/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/texinfo/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/text/proselint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/xhtml/proselint.vim create mode 100644 sources_non_forked/vim-go/autoload/go/job.vim create mode 100644 sources_non_forked/vim-go/autoload/go/statusline.vim rename sources_non_forked/vim-snipmate/doc/{snipMate.txt => SnipMate.txt} (100%) create mode 100644 sources_non_forked/vim-snippets/AUTHORS create mode 100644 sources_non_forked/vim-snippets/UltiSnips/cuda.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/cuda.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/handlebars.snippets rename sources_non_forked/vim-snippets/snippets/{javascript/bemjson.snippets => javascript-bemjson.snippets} (97%) rename sources_non_forked/vim-snippets/snippets/{javascript/javascript.d3.snippets => javascript-d3.snippets} (100%) create mode 100644 sources_non_forked/vim-snippets/snippets/javascript.es6.react.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/javascript/javascript-react.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/ps1.snippets create mode 100644 sources_non_forked/vim-snippets/snippets/purescript.snippets diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim index 568b0f3a..fc8b8830 100644 --- a/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim @@ -1,8 +1,9 @@ " ============================================================================= " File: autoload/ctrlp.vim " Description: Fuzzy file, buffer, mru, tag, etc finder. -" Author: Kien Nguyen -" Version: 1.79 +" Author: CtrlP Dev Team +" Original: Kien Nguyen +" Version: 1.80 " ============================================================================= " ** Static variables {{{1 @@ -98,6 +99,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 +214,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 +330,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 +435,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 +455,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 +673,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 +938,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' @@ -1569,7 +1584,7 @@ fu! s:formatline(str) let str .= printf(' %s', ''.parts[3].'') en el - let str .= printf(' %-5s %-30s %s', + let str .= printf(' %-5s %-30s', \ parts[0], \ parts[2]) if (!empty(s:bufpath_mod)) @@ -2562,6 +2577,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 +2607,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 diff --git a/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx b/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx index ac4fa3b6..c2d69729 100644 --- a/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx +++ b/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx @@ -885,7 +885,8 @@ MRU mode options:~ 在匹配窗口和提示符面板之间切换焦点。 , - + , + 退出CtrlP。 移动:~ diff --git a/sources_non_forked/ctrlp.vim/doc/ctrlp.txt b/sources_non_forked/ctrlp.vim/doc/ctrlp.txt index 416fd000..1107497b 100644 --- a/sources_non_forked/ctrlp.vim/doc/ctrlp.txt +++ b/sources_non_forked/ctrlp.vim/doc/ctrlp.txt @@ -943,7 +943,8 @@ Once inside the prompt:~ Toggle the focus between the match window and the prompt. , - + , + Exit CtrlP. Moving:~ @@ -1496,6 +1497,28 @@ Special thanks:~ =============================================================================== CHANGELOG *ctrlp-changelog* +Before 2016/11/28~ + + + New command: |YankLine()| to yank current line. + + New option: |g:ctrlp_types| to select builtin modes. + + New feature: asynchronized spawn of |g:ctrlp_user_command|. This enable + with set |g:user_command_async| to 1. + + Support buffertag for delphi, rust and golang. + + New option: |g:ctrlp_brief_prompt|, + |g:match_current_file|, + |g:ctrlp_compare_lim|. + + New feature: Auto-ignore extension. + + Support buffertag for ant, tex, dosbatch, matlab and vhdl. + + New option |g:ctrlp_line_prefix| for integrating third party plugins. + + New option |g:open_single_match| to open single file in matches. + + Add (ctrlp) for launch CtrlP. + + Accept bang for CtrlPBookmarkDirAdd to avoid confirm. + + Handle variable like "g:ctrlp_TYPE_MODE". + ex: let g:ctrlp_path_sort + + New option: |g:ctrlp_custom_ancestors| + +Before 2014/08/08~ + + New buffer explorer mode with highlighting (|+conceal| recommended) + New options: |g:ctrlp_bufname_mod|, |g:ctrlp_bufpath_mod| diff --git a/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim b/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim index 5ab368aa..f31b64a2 100644 --- a/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim +++ b/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim @@ -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 = '' | en if !exists('g:ctrlp_cmd') | let g:ctrlp_cmd = 'CtrlP' | en -com! -n=? -com=dir CtrlP cal ctrlp#init('fil', { 'dir': }) +com! -n=? -com=dir CtrlP cal ctrlp#init(0, { 'dir': }) com! -n=? -com=dir CtrlPMRUFiles cal ctrlp#init('mru', { 'dir': }) com! -bar CtrlPBuffer cal ctrlp#init('buf') diff --git a/sources_non_forked/lightline.vim/README.md b/sources_non_forked/lightline.vim/README.md index 31f79fda..2b80f35b 100644 --- a/sources_non_forked/lightline.vim/README.md +++ b/sources_non_forked/lightline.vim/README.md @@ -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' : diff --git a/sources_non_forked/lightline.vim/autoload/lightline.vim b/sources_non_forked/lightline.vim/autoload/lightline.vim index 14d1d2ab..6bcc09b4 100644 --- a/sources_non_forked/lightline.vim/autoload/lightline.vim +++ b/sources_non_forked/lightline.vim/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2016/09/04 13:01:40. +" Last Change: 2016/12/03 12:08:08. " ============================================================================= let s:save_cpo = &cpo @@ -156,7 +156,7 @@ function! lightline#init() abort endfor call extend(s:lightline.tabline_separator, s:lightline.separator, 'keep') call extend(s:lightline.tabline_subseparator, s:lightline.subseparator, 'keep') - let s:lightline.tabline_configured = 0 + let s:lightline.tabline_configured = has_key(get(get(g:, 'lightline', {}), 'component_expand', {}), 'tabs') for components in deepcopy(s:lightline.tabline.left + s:lightline.tabline.right) if len(filter(components, 'v:val !=# "tabs" && v:val !=# "close"')) > 0 let s:lightline.tabline_configured = 1 @@ -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 @@ -229,16 +229,16 @@ function! lightline#link(...) abort for [p, l] in [['Left', len(s:lightline.active.left)], ['Right', len(s:lightline.active.right)]] for [i, t] in map(range(0, l), '[v:val, 0]') + types if i != l - exec printf('hi link LightLine%s_active_%s LightLine%s_%s_%s', p, i, p, mode, i) + exec printf('hi link Lightline%s_active_%s Lightline%s_%s_%s', p, i, p, mode, i) endif for [j, s] in map(range(0, l), '[v:val, 0]') + types if i + 1 == j || t || s && i != l - exec printf('hi link LightLine%s_active_%s_%s LightLine%s_%s_%s_%s', p, i, j, p, mode, i, j) + exec printf('hi link Lightline%s_active_%s_%s Lightline%s_%s_%s_%s', p, i, j, p, mode, i, j) endif endfor endfor endfor - exec printf('hi link LightLineMiddle_active LightLineMiddle_%s', mode) + exec printf('hi link LightlineMiddle_active LightlineMiddle_%s', mode) return '' endfunction @@ -279,17 +279,17 @@ function! lightline#highlight(...) abort for [i, t] in map(range(0, l), '[v:val, 0]') + types if i < l || i < 1 let r = t ? (has_key(get(c, d, []), i) ? c[d][i][0] : has_key(get(c, 'tabline', {}), i) ? c.tabline[i][0] : get(c.normal, i, zs)[0]) : get(zs, i, ms) - exec printf('hi LightLine%s_%s_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s %s', p, mode, i, r[0], r[1], r[2], r[3], s:term(r)) + exec printf('hi Lightline%s_%s_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s %s', p, mode, i, r[0], r[1], r[2], r[3], s:term(r)) endif for [j, s] in map(range(0, l), '[v:val, 0]') + types if i + 1 == j || t || s && i != l let q = s ? (has_key(get(c, d, []), j) ? c[d][j][0] : has_key(get(c, 'tabline', {}), j) ? c.tabline[j][0] : get(c.normal, j, zs)[0]) : (j != l ? get(zs, j, ms) :ms) - exec printf('hi LightLine%s_%s_%s_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s', p, mode, i, j, r[1], q[1], r[3], q[3]) + exec printf('hi Lightline%s_%s_%s_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s', p, mode, i, j, r[1], q[1], r[3], q[3]) endif endfor endfor endfor - exec printf('hi LightLineMiddle_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s %s', mode, ms[0], ms[1], ms[2], ms[3], s:term(ms)) + exec printf('hi LightlineMiddle_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s %s', mode, ms[0], ms[1], ms[2], ms[3], s:term(ms)) endfor endfunction @@ -400,7 +400,7 @@ function! s:line(tabline, inactive) abort let r_ = has_key(s:lightline, mode) ? s:lightline[mode].right : s:lightline.active.right let [rt, rc, rl] = s:expand(copy(r_)) for i in range(len(lt)) - let _ .= '%#LightLineLeft_' . mode . '_' . ll[i] . '#' + let _ .= '%#LightlineLeft_' . mode . '_' . ll[i] . '#' for j in range(len(lt[i])) let x = lc[i][j] ? lt[i][j] : has_key(f, lt[i][j]) ? (exists('*' . f[lt[i][j]]) ? '%{' . f[lt[i][j]] . '()}' : '%{exists("*' . f[lt[i][j]] . '")?' . f[lt[i][j]] . '():""}') : get(c, lt[i][j], '') let _ .= has_key(t, lt[i][j]) && t[lt[i][j]] ==# 'raw' || x ==# '' ? x : '%( ' . x . ' %)' @@ -408,14 +408,14 @@ function! s:line(tabline, inactive) abort let _ .= s:subseparator(lt[i][(j):], s.left, lc[i][(j):]) endif endfor - let _ .= '%#LightLineLeft_' . mode . '_' . ll[i] . '_' . ll[i + 1] . '#' + let _ .= '%#LightlineLeft_' . mode . '_' . ll[i] . '_' . ll[i + 1] . '#' let _ .= i < l + len(lt) - len(l_) && ll[i] < l || ll[i] != ll[i + 1] ? p.left : len(lt[i]) ? s.left : '' endfor - let _ .= '%#LightLineMiddle_' . mode . '#%=' + let _ .= '%#LightlineMiddle_' . mode . '#%=' for i in reverse(range(len(rt))) - let _ .= '%#LightLineRight_' . mode . '_' . rl[i] . '_' . rl[i + 1] . '#' + let _ .= '%#LightlineRight_' . mode . '_' . rl[i] . '_' . rl[i + 1] . '#' let _ .= i < r + len(rt) - len(r_) && rl[i] < r || rl[i] != rl[i + 1] ? p.right : len(rt[i]) ? s.right : '' - let _ .= '%#LightLineRight_' . mode . '_' . rl[i] . '#' + let _ .= '%#LightlineRight_' . mode . '_' . rl[i] . '#' for j in range(len(rt[i])) let x = rc[i][j] ? rt[i][j] : has_key(f, rt[i][j]) ? (exists('*' . f[rt[i][j]]) ? '%{' . f[rt[i][j]] . '()}' : '%{exists("*' . f[rt[i][j]] . '")?' . f[rt[i][j]] . '():""}') : get(c, rt[i][j], '') let _ .= has_key(t, rt[i][j]) && t[rt[i][j]] ==# 'raw' || x ==# '' ? x : '%( ' . x . ' %)' diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Dracula.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Dracula.vim new file mode 100644 index 00000000..42f83f69 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/Dracula.vim @@ -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) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/molokai.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/molokai.vim new file mode 100644 index 00000000..9d066a1b --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/molokai.vim @@ -0,0 +1,36 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/molokai.vim +" Author: challsted +" License: MIT License +" Last Change: 2016/11/17 00:27:58. +" ============================================================================= +" +let s:black = [ '#232526', 233 ] +let s:gray = [ '#808080', 244 ] +let s:white = [ '#f8f8f2', 234 ] +let s:cyan = [ '#66d9ef', 81 ] +let s:green = [ '#a6e22e', 118 ] +let s:orange = [ '#ef5939', 166 ] +let s:pink = [ '#f92672', 161 ] +let s:red = [ '#ff0000', 160 ] +let s:yellow = [ '#e6db74', 229 ] + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} + +let s:p.normal.left = [ [ s:black, s:cyan ], [ s:orange, s:black ] ] +let s:p.normal.middle = [ [ s:orange, s:black ] ] +let s:p.normal.right = [ [ s:pink, s:black ], [ s:black, s:pink ] ] +let s:p.normal.error = [ [ s:pink, s:black ] ] +let s:p.normal.warning = [ [ s:yellow, s:black ] ] +let s:p.insert.left = [ [ s:black, s:green ], [ s:green, s:black ] ] +let s:p.visual.left = [ [ s:black, s:yellow ], [ s:yellow, s:black ] ] +let s:p.replace.left = [ [ s:black, s:red ], [ s:red, s:black ] ] +let s:p.inactive.left = [ [ s:pink, s:black ], [ s:white, s:black ] ] +let s:p.inactive.middle = [ [ s:gray, s:black ] ] +let s:p.inactive.right = [ [ s:white, s:pink ], [ s:pink, s:black ] ] +let s:p.tabline.left = [ [ s:pink, s:black ] ] +let s:p.tabline.middle = [ [ s:pink, s:black] ] +let s:p.tabline.right = copy(s:p.normal.right) +let s:p.tabline.tabsel = [ [ s:black, s:pink ] ] + +let g:lightline#colorscheme#molokai#palette = lightline#colorscheme#flatten(s:p) diff --git a/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/one.vim b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/one.vim new file mode 100644 index 00000000..f50de8c1 --- /dev/null +++ b/sources_non_forked/lightline.vim/autoload/lightline/colorscheme/one.vim @@ -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) diff --git a/sources_non_forked/lightline.vim/doc/lightline.txt b/sources_non_forked/lightline.vim/doc/lightline.txt index f4bc29be..8b0a580d 100644 --- a/sources_non_forked/lightline.vim/doc/lightline.txt +++ b/sources_non_forked/lightline.vim/doc/lightline.txt @@ -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, Molokai 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 : '' @@ -636,6 +636,16 @@ compiled version of your colorscheme. < Then copy and paste the result to the colorscheme file. +If you want to contribute a new colorscheme that is not currently available +please follow the following rules: + *) All hex codes should be lowercase only + *) Use 2 space soft tabs + *) If your colorscheme has both light and dark variants, use a single file + *) Normal Mode should default to Cyan + *) Insert Mode should default to Green + *) Visual Mode should default to Yellow + *) Replace Mode should default to Red + ============================================================================== EXAMPLES *lightline-examples* You can configure the appearance of statusline. @@ -655,22 +665,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 +720,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 +753,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 +794,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 +811,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 +827,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 +844,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 +1199,10 @@ Problem 12: *lightline-problem-12* > let g:lightline = { \ 'component': { - \ 'modified': '%#ModifiedColor#%{LightLineModified()}', + \ 'modified': '%#ModifiedColor#%{LightlineModified()}', \ } \ } - function! LightLineModified() + function! LightlineModified() let map = { 'V': 'n', "\": 'n', 's': 'n', 'v': 'n', "\": 'n', 'c': 'n', 'R': 'n'} let mode = get(map, mode()[0], mode()[0]) let bgcolor = {'n': [240, '#585858'], 'i': [31, '#0087af']} @@ -1211,7 +1221,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 diff --git a/sources_non_forked/lightline.vim/test/highlight.vim b/sources_non_forked/lightline.vim/test/highlight.vim index fe5182a3..0e9e6566 100644 --- a/sources_non_forked/lightline.vim/test/highlight.vim +++ b/sources_non_forked/lightline.vim/test/highlight.vim @@ -23,14 +23,14 @@ function! s:suite.highlight() call lightline#init() call lightline#colorscheme() let palette = lightline#palette() - call s:assert.match(s:hi('LightLineLeft_normal_0'), s:pattern(palette.normal.left[0])) - call s:assert.match(s:hi('LightLineLeft_normal_1'), s:pattern(palette.normal.left[1])) - call s:assert.match(s:hi('LightLineLeft_normal_2'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineRight_normal_0'), s:pattern(palette.normal.right[0])) - call s:assert.match(s:hi('LightLineRight_normal_1'), s:pattern(palette.normal.right[1])) - call s:assert.match(s:hi('LightLineRight_normal_2'), s:pattern(palette.normal.right[2])) - call s:assert.match(s:hi('LightLineRight_normal_3'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightlineLeft_normal_0'), s:pattern(palette.normal.left[0])) + call s:assert.match(s:hi('LightlineLeft_normal_1'), s:pattern(palette.normal.left[1])) + call s:assert.match(s:hi('LightlineLeft_normal_2'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineRight_normal_0'), s:pattern(palette.normal.right[0])) + call s:assert.match(s:hi('LightlineRight_normal_1'), s:pattern(palette.normal.right[1])) + call s:assert.match(s:hi('LightlineRight_normal_2'), s:pattern(palette.normal.right[2])) + call s:assert.match(s:hi('LightlineRight_normal_3'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineMiddle_normal'), s:pattern(palette.normal.middle[0])) endfunction function! s:suite.insert() @@ -39,14 +39,14 @@ function! s:suite.insert() call lightline#colorscheme() call lightline#highlight('insert') let palette = lightline#palette() - call s:assert.match(s:hi('LightLineLeft_insert_0'), s:pattern(palette.insert.left[0])) - call s:assert.match(s:hi('LightLineLeft_insert_1'), s:pattern(palette.insert.left[1])) - call s:assert.match(s:hi('LightLineLeft_insert_2'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineRight_insert_0'), s:pattern(palette.insert.right[0])) - call s:assert.match(s:hi('LightLineRight_insert_1'), s:pattern(palette.insert.right[1])) - call s:assert.match(s:hi('LightLineRight_insert_2'), s:pattern(palette.insert.right[2])) - call s:assert.match(s:hi('LightLineRight_insert_3'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineMiddle_insert'), s:pattern(palette.insert.middle[0])) + call s:assert.match(s:hi('LightlineLeft_insert_0'), s:pattern(palette.insert.left[0])) + call s:assert.match(s:hi('LightlineLeft_insert_1'), s:pattern(palette.insert.left[1])) + call s:assert.match(s:hi('LightlineLeft_insert_2'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineRight_insert_0'), s:pattern(palette.insert.right[0])) + call s:assert.match(s:hi('LightlineRight_insert_1'), s:pattern(palette.insert.right[1])) + call s:assert.match(s:hi('LightlineRight_insert_2'), s:pattern(palette.insert.right[2])) + call s:assert.match(s:hi('LightlineRight_insert_3'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineMiddle_insert'), s:pattern(palette.insert.middle[0])) endfunction @@ -56,14 +56,14 @@ function! s:suite.visual() call lightline#colorscheme() call lightline#highlight('visual') let palette = lightline#palette() - call s:assert.match(s:hi('LightLineLeft_visual_0'), s:pattern(palette.visual.left[0])) - call s:assert.match(s:hi('LightLineLeft_visual_1'), s:pattern(palette.visual.left[1])) - call s:assert.match(s:hi('LightLineLeft_visual_2'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineRight_visual_0'), s:pattern(palette.normal.right[0])) - call s:assert.match(s:hi('LightLineRight_visual_1'), s:pattern(palette.normal.right[1])) - call s:assert.match(s:hi('LightLineRight_visual_2'), s:pattern(palette.normal.right[2])) - call s:assert.match(s:hi('LightLineRight_visual_3'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightlineLeft_visual_0'), s:pattern(palette.visual.left[0])) + call s:assert.match(s:hi('LightlineLeft_visual_1'), s:pattern(palette.visual.left[1])) + call s:assert.match(s:hi('LightlineLeft_visual_2'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineRight_visual_0'), s:pattern(palette.normal.right[0])) + call s:assert.match(s:hi('LightlineRight_visual_1'), s:pattern(palette.normal.right[1])) + call s:assert.match(s:hi('LightlineRight_visual_2'), s:pattern(palette.normal.right[2])) + call s:assert.match(s:hi('LightlineRight_visual_3'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineMiddle_normal'), s:pattern(palette.normal.middle[0])) endfunction function! s:suite.replace() @@ -72,14 +72,14 @@ function! s:suite.replace() call lightline#colorscheme() call lightline#highlight('replace') let palette = lightline#palette() - call s:assert.match(s:hi('LightLineLeft_replace_0'), s:pattern(palette.replace.left[0])) - call s:assert.match(s:hi('LightLineLeft_replace_1'), s:pattern(palette.replace.left[1])) - call s:assert.match(s:hi('LightLineLeft_replace_2'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineRight_replace_0'), s:pattern(palette.replace.right[0])) - call s:assert.match(s:hi('LightLineRight_replace_1'), s:pattern(palette.replace.right[1])) - call s:assert.match(s:hi('LightLineRight_replace_2'), s:pattern(palette.replace.right[2])) - call s:assert.match(s:hi('LightLineRight_replace_3'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineMiddle_replace'), s:pattern(palette.replace.middle[0])) + call s:assert.match(s:hi('LightlineLeft_replace_0'), s:pattern(palette.replace.left[0])) + call s:assert.match(s:hi('LightlineLeft_replace_1'), s:pattern(palette.replace.left[1])) + call s:assert.match(s:hi('LightlineLeft_replace_2'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineRight_replace_0'), s:pattern(palette.replace.right[0])) + call s:assert.match(s:hi('LightlineRight_replace_1'), s:pattern(palette.replace.right[1])) + call s:assert.match(s:hi('LightlineRight_replace_2'), s:pattern(palette.replace.right[2])) + call s:assert.match(s:hi('LightlineRight_replace_3'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineMiddle_replace'), s:pattern(palette.replace.middle[0])) endfunction function! s:suite.left_right() @@ -92,18 +92,18 @@ function! s:suite.left_right() call lightline#init() call lightline#colorscheme() let palette = lightline#palette() - call s:assert.match(s:hi('LightLineLeft_normal_0'), s:pattern(palette.normal.left[0])) - call s:assert.match(s:hi('LightLineLeft_normal_1'), s:pattern(palette.normal.left[1])) - call s:assert.match(s:hi('LightLineLeft_normal_2'), s:pattern(palette.normal.middle[0])) - call s:assert.match(s:hi('LightLineLeft_normal_3'), s:pattern(palette.normal.middle[0])) - call s:assert.match(s:hi('LightLineLeft_normal_4'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineRight_normal_0'), s:pattern(palette.normal.right[0])) - call s:assert.match(s:hi('LightLineRight_normal_1'), s:pattern(palette.normal.right[1])) - call s:assert.match(s:hi('LightLineRight_normal_2'), s:pattern(palette.normal.right[2])) - call s:assert.match(s:hi('LightLineRight_normal_3'), s:pattern(palette.normal.middle[0])) - call s:assert.match(s:hi('LightLineRight_normal_4'), s:pattern(palette.normal.middle[0])) - call s:assert.match(s:hi('LightLineRight_normal_5'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightlineLeft_normal_0'), s:pattern(palette.normal.left[0])) + call s:assert.match(s:hi('LightlineLeft_normal_1'), s:pattern(palette.normal.left[1])) + call s:assert.match(s:hi('LightlineLeft_normal_2'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightlineLeft_normal_3'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightlineLeft_normal_4'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineRight_normal_0'), s:pattern(palette.normal.right[0])) + call s:assert.match(s:hi('LightlineRight_normal_1'), s:pattern(palette.normal.right[1])) + call s:assert.match(s:hi('LightlineRight_normal_2'), s:pattern(palette.normal.right[2])) + call s:assert.match(s:hi('LightlineRight_normal_3'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightlineRight_normal_4'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightlineRight_normal_5'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineMiddle_normal'), s:pattern(palette.normal.middle[0])) endfunction function! s:suite.no_components() @@ -120,11 +120,11 @@ function! s:suite.no_components() call lightline#init() call lightline#colorscheme() let palette = lightline#palette() - call s:assert.match(s:hi('LightLineLeft_normal_0'), s:pattern(palette.normal.left[0])) - call s:assert.match(s:hi('LightLineLeft_normal_1'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineRight_normal_0'), s:pattern(palette.normal.right[0])) - call s:assert.match(s:hi('LightLineRight_normal_1'), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi('LightLineMiddle_normal'), s:pattern(palette.normal.middle[0])) + call s:assert.match(s:hi('LightlineLeft_normal_0'), s:pattern(palette.normal.left[0])) + call s:assert.match(s:hi('LightlineLeft_normal_1'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineRight_normal_0'), s:pattern(palette.normal.right[0])) + call s:assert.match(s:hi('LightlineRight_normal_1'), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi('LightlineMiddle_normal'), s:pattern(palette.normal.middle[0])) endfunction function! s:suite.subseparator() @@ -140,9 +140,9 @@ function! s:suite.subseparator() for i in range(4) for j in range(5) if i + 1 == j - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', i, j)), s:pattern(get(palette.normal.left, i, palette.normal.middle[0]), get(palette.normal.left, j, palette.normal.middle[0]))) + call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_%s', i, j)), s:pattern(get(palette.normal.left, i, palette.normal.middle[0]), get(palette.normal.left, j, palette.normal.middle[0]))) else - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', i, j)), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_%s', i, j)), 'E411: highlight group not found\|cleared') endif endfor endfor @@ -154,18 +154,18 @@ function! s:suite.component_type() call lightline#colorscheme() let palette = lightline#palette() for type in ['error', 'warning'] - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s', type)), s:pattern(palette.normal[type][0])) - call s:assert.match(s:hi(printf('LightLineLeft_normal_0_%s', type)), s:pattern(palette.normal.left[0], palette.normal[type][0])) - call s:assert.match(s:hi(printf('LightLineLeft_normal_1_%s', type)), s:pattern(palette.normal.left[1], palette.normal[type][0])) - call s:assert.match(s:hi(printf('LightLineLeft_normal_2_%s', type)), 'E411: highlight group not found\|cleared') - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_0', type)), s:pattern(palette.normal[type][0], palette.normal.left[0])) - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_1', type)), s:pattern(palette.normal[type][0], palette.normal.left[1])) - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_2', type)), s:pattern(palette.normal[type][0], palette.normal.middle[0])) - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_3', type)), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi(printf('LightlineLeft_normal_%s', type)), s:pattern(palette.normal[type][0])) + call s:assert.match(s:hi(printf('LightlineLeft_normal_0_%s', type)), s:pattern(palette.normal.left[0], palette.normal[type][0])) + call s:assert.match(s:hi(printf('LightlineLeft_normal_1_%s', type)), s:pattern(palette.normal.left[1], palette.normal[type][0])) + call s:assert.match(s:hi(printf('LightlineLeft_normal_2_%s', type)), 'E411: highlight group not found\|cleared') + call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_0', type)), s:pattern(palette.normal[type][0], palette.normal.left[0])) + call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_1', type)), s:pattern(palette.normal[type][0], palette.normal.left[1])) + call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_2', type)), s:pattern(palette.normal[type][0], palette.normal.middle[0])) + call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_3', type)), 'E411: highlight group not found\|cleared') endfor for type1 in ['error', 'warning'] for type2 in ['error', 'warning'] - call s:assert.match(s:hi(printf('LightLineLeft_normal_%s_%s', type1, type2)), s:pattern(palette.normal[type1][0], palette.normal[type2][0])) + call s:assert.match(s:hi(printf('LightlineLeft_normal_%s_%s', type1, type2)), s:pattern(palette.normal[type1][0], palette.normal[type2][0])) endfor endfor endfunction diff --git a/sources_non_forked/lightline.vim/test/link.vim b/sources_non_forked/lightline.vim/test/link.vim index ca867536..c0811c42 100644 --- a/sources_non_forked/lightline.vim/test/link.vim +++ b/sources_non_forked/lightline.vim/test/link.vim @@ -17,50 +17,50 @@ endfunction function! s:suite.link() call lightline#link() - call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_normal_0') - call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_normal_1') - call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_normal_0') - call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_normal_1') - call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_normal_2') - call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_normal') + call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_normal_0') + call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_normal_1') + call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_normal_0') + call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_normal_1') + call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_normal_2') + call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_normal') endfunction function! s:suite.insert() call lightline#link('i') - call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_insert_0') - call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_insert_1') - call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_insert_0') - call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_insert_1') - call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_insert_2') - call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_insert') + call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_insert_0') + call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_insert_1') + call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_insert_0') + call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_insert_1') + call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_insert_2') + call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_insert') endfunction function! s:suite.visual() call lightline#link('v') - call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_visual_0') - call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_visual_1') - call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_visual_0') - call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_visual_1') - call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_visual_2') - call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_visual') + call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_visual_0') + call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_visual_1') + call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_visual_0') + call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_visual_1') + call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_visual_2') + call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_visual') endfunction function! s:suite.replace() call lightline#link('R') - call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_replace_0') - call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_replace_1') - call s:assert.match(s:hi('LightLineLeft_active_2'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_replace_0') - call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_replace_1') - call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_replace_2') - call s:assert.match(s:hi('LightLineRight_active_3'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_replace') + call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_replace_0') + call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_replace_1') + call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_replace_0') + call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_replace_1') + call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_replace_2') + call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_replace') endfunction function! s:suite.left_right() @@ -73,18 +73,18 @@ function! s:suite.left_right() call lightline#init() call lightline#colorscheme() call lightline#link() - call s:assert.match(s:hi('LightLineLeft_active_0'), 'LightLineLeft_normal_0') - call s:assert.match(s:hi('LightLineLeft_active_1'), 'LightLineLeft_normal_1') - call s:assert.match(s:hi('LightLineLeft_active_2'), 'LightLineLeft_normal_2') - call s:assert.match(s:hi('LightLineLeft_active_3'), 'LightLineLeft_normal_3') - call s:assert.match(s:hi('LightLineLeft_active_4'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineRight_active_0'), 'LightLineRight_normal_0') - call s:assert.match(s:hi('LightLineRight_active_1'), 'LightLineRight_normal_1') - call s:assert.match(s:hi('LightLineRight_active_2'), 'LightLineRight_normal_2') - call s:assert.match(s:hi('LightLineRight_active_3'), 'LightLineRight_normal_3') - call s:assert.match(s:hi('LightLineRight_active_4'), 'LightLineRight_normal_4') - call s:assert.match(s:hi('LightLineRight_active_5'), 'E411: highlight group not found') - call s:assert.match(s:hi('LightLineMiddle_active'), 'LightLineMiddle_normal') + call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_normal_0') + call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_normal_1') + call s:assert.match(s:hi('LightlineLeft_active_2'), 'LightlineLeft_normal_2') + call s:assert.match(s:hi('LightlineLeft_active_3'), 'LightlineLeft_normal_3') + call s:assert.match(s:hi('LightlineLeft_active_4'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_normal_0') + call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_normal_1') + call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_normal_2') + call s:assert.match(s:hi('LightlineRight_active_3'), 'LightlineRight_normal_3') + call s:assert.match(s:hi('LightlineRight_active_4'), 'LightlineRight_normal_4') + call s:assert.match(s:hi('LightlineRight_active_5'), 'E411: highlight group not found') + call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_normal') endfunction function! s:suite.subseparator() @@ -100,9 +100,9 @@ function! s:suite.subseparator() for i in range(4) for j in range(5) if i + 1 == j - call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', i, j)), printf('LightLineLeft_normal_%s_%s', i, j)) + call s:assert.match(s:hi(printf('LightlineLeft_active_%s_%s', i, j)), printf('LightlineLeft_normal_%s_%s', i, j)) else - call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', i, j)), 'E411: highlight group not found') + call s:assert.match(s:hi(printf('LightlineLeft_active_%s_%s', i, j)), 'E411: highlight group not found') endif endfor endfor @@ -114,18 +114,18 @@ function! s:suite.component_type() call lightline#colorscheme() call lightline#link() for type in ['error', 'warning'] - call s:assert.match(s:hi(printf('LightLineLeft_active_%s', type)), printf('LightLineLeft_normal_%s', type)) - call s:assert.match(s:hi(printf('LightLineLeft_active_0_%s', type)), printf('LightLineLeft_normal_0_%s', type)) - call s:assert.match(s:hi(printf('LightLineLeft_active_1_%s', type)), printf('LightLineLeft_normal_1_%s', type)) - call s:assert.match(s:hi(printf('LightLineLeft_active_2_%s', type)), 'E411: highlight group not found') - call s:assert.match(s:hi(printf('LightLineLeft_active_%s_0', type)), printf('LightLineLeft_normal_%s_0', type)) - call s:assert.match(s:hi(printf('LightLineLeft_active_%s_1', type)), printf('LightLineLeft_normal_%s_1', type)) - call s:assert.match(s:hi(printf('LightLineLeft_active_%s_2', type)), printf('LightLineLeft_normal_%s_2', type)) - call s:assert.match(s:hi(printf('LightLineLeft_active_%s_3', type)), 'E411: highlight group not found') + call s:assert.match(s:hi(printf('LightlineLeft_active_%s', type)), printf('LightlineLeft_normal_%s', type)) + call s:assert.match(s:hi(printf('LightlineLeft_active_0_%s', type)), printf('LightlineLeft_normal_0_%s', type)) + call s:assert.match(s:hi(printf('LightlineLeft_active_1_%s', type)), printf('LightlineLeft_normal_1_%s', type)) + call s:assert.match(s:hi(printf('LightlineLeft_active_2_%s', type)), 'E411: highlight group not found') + call s:assert.match(s:hi(printf('LightlineLeft_active_%s_0', type)), printf('LightlineLeft_normal_%s_0', type)) + call s:assert.match(s:hi(printf('LightlineLeft_active_%s_1', type)), printf('LightlineLeft_normal_%s_1', type)) + call s:assert.match(s:hi(printf('LightlineLeft_active_%s_2', type)), printf('LightlineLeft_normal_%s_2', type)) + call s:assert.match(s:hi(printf('LightlineLeft_active_%s_3', type)), 'E411: highlight group not found') endfor for type1 in ['error', 'warning'] for type2 in ['error', 'warning'] - call s:assert.match(s:hi(printf('LightLineLeft_active_%s_%s', type1, type2)), printf('LightLineLeft_normal_%s_%s', type1, type2)) + call s:assert.match(s:hi(printf('LightlineLeft_active_%s_%s', type1, type2)), printf('LightlineLeft_normal_%s_%s', type1, type2)) endfor endfor endfunction diff --git a/sources_non_forked/nerdtree/CHANGELOG b/sources_non_forked/nerdtree/CHANGELOG index a06c1669..a23884a9 100644 --- a/sources_non_forked/nerdtree/CHANGELOG +++ b/sources_non_forked/nerdtree/CHANGELOG @@ -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 diff --git a/sources_non_forked/nerdtree/README.markdown b/sources_non_forked/nerdtree/README.markdown index b25b97ef..4f5133a2 100644 --- a/sources_non_forked/nerdtree/README.markdown +++ b/sources_non_forked/nerdtree/README.markdown @@ -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 = '▾' diff --git a/sources_non_forked/nerdtree/autoload/nerdtree.vim b/sources_non_forked/nerdtree/autoload/nerdtree.vim index 3ad2a031..e0d86efa 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree.vim @@ -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 diff --git a/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim b/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim index 73a30f7a..1404cee0 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/nerdtree.vim @@ -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() diff --git a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim index dff4027e..e563a947 100644 --- a/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim +++ b/sources_non_forked/nerdtree/nerdtree_plugin/fs_menu.vim @@ -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 diff --git a/sources_non_forked/nerdtree/plugin/NERD_tree.vim b/sources_non_forked/nerdtree/plugin/NERD_tree.vim index a27714f4..451b431b 100644 --- a/sources_non_forked/nerdtree/plugin/NERD_tree.vim +++ b/sources_non_forked/nerdtree/plugin/NERD_tree.vim @@ -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", "~") diff --git a/sources_non_forked/nerdtree/syntax/nerdtree.vim b/sources_non_forked/nerdtree/syntax/nerdtree.vim index efdd9436..e93ca1df 100644 --- a/sources_non_forked/nerdtree/syntax/nerdtree.vim +++ b/sources_non_forked/nerdtree/syntax/nerdtree.vim @@ -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 diff --git a/sources_non_forked/syntastic/CONTRIBUTING.md b/sources_non_forked/syntastic/CONTRIBUTING.md index 1949415e..44eb13f8 100644 --- a/sources_non_forked/syntastic/CONTRIBUTING.md +++ b/sources_non_forked/syntastic/CONTRIBUTING.md @@ -97,9 +97,9 @@ let errorformat = \ '%-G%.%#' ``` -[bug_tracker]: https://github.com/scrooloose/syntastic/issues -[manual]: https://github.com/scrooloose/syntastic/blob/master/doc/syntastic.txt -[github]: https://github.com/scrooloose/syntastic +[bug_tracker]: https://github.com/vim-syntastic/syntastic/issues +[manual]: https://github.com/vim-syntastic/syntastic/blob/master/doc/syntastic.txt +[github]: https://github.com/vim-syntastic/syntastic [branches]: https://github.com/dchelimsky/rspec/wiki/Topic-Branches#using-topic-branches-when-contributing-patches [variables]: http://www.refactoring.com/catalog/extractVariable.html -[guide]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide +[guide]: https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checker-Guide diff --git a/sources_non_forked/syntastic/README.markdown b/sources_non_forked/syntastic/README.markdown index 1cf31e6f..7ed8cc87 100644 --- a/sources_non_forked/syntastic/README.markdown +++ b/sources_non_forked/syntastic/README.markdown @@ -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) - - - @@ -48,11 +49,12 @@ ## 1\. Introduction -Syntastic is a syntax checking plugin for [Vim][vim] that runs files through -external syntax checkers and displays any resulting errors to the user. This -can be done on demand, or automatically as files are saved. If syntax errors -are detected, the user is notified and is happy because they didn't have to -compile their code or execute their script to find them. +Syntastic is a syntax checking plugin for [Vim][vim] created by +[Martin Grenfell][scrooloose]. It runs files through external syntax checkers +and displays any resulting errors to the user. This can be done on demand, or +automatically as files are saved. If syntax errors are detected, the user is +notified and is happy because they didn't have to compile their code or execute +their script to find them. At the time of this writing, syntastic has checking plugins for ACPI Source Language, ActionScript, Ada, Ansible configurations, API Blueprint, @@ -65,9 +67,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 @@ -152,7 +154,7 @@ You now have pathogen installed and can put syntastic into `~/.vim/bundle` like this: ```sh cd ~/.vim/bundle && \ -git clone --depth=1 https://github.com/scrooloose/syntastic.git +git clone --depth=1 https://github.com/vim-syntastic/syntastic.git ``` Quit vim and start it back up to reload it, then type: ```vim @@ -264,13 +266,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__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__checkers`. + + + +__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. -__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 +307,7 @@ See `:help syntastic-aggregating-errors` for more details. -__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 +331,8 @@ list of options should be included in the [manual][checkers] -__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 +344,7 @@ let g:syntastic_always_populate_loc_list = 1 -__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 +356,7 @@ mappings (among other things). -__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 +368,7 @@ cabbrev bd =(getcmdtype()==#':' && getcmdpos()==1 ? 'lclose\|bdele -__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 +388,7 @@ autocmd FileType javascript let b:syntastic_javascript_jscs_args = -__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 +418,7 @@ See `:help syntastic_quiet_messages` for more information. -__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 +434,7 @@ scripts. -__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 +449,7 @@ scripts. -__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 +465,14 @@ let g:syntastic_enable_perl_checker = 1 -__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. -__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 +480,7 @@ install this plugin the checker should be picked up automatically by syntastic. -__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 @@ -477,15 +502,16 @@ plugins that provide more functionality than syntastic. You might want to take a look at [ghcmod-vim][ghcmod], [jedi-vim][jedi], [python-mode][python_mode], [vim-go][vimgo], or [YouCompleteMe][ycm]. -[screenshot]: https://github.com/scrooloose/syntastic/raw/master/_assets/screenshot_1.png +[scrooloose]: https://github.com/scrooloose +[screenshot]: https://github.com/vim-syntastic/syntastic/raw/master/_assets/screenshot_1.png -[bug_tracker]: https://github.com/scrooloose/syntastic/issues -[checkers]: https://github.com/scrooloose/syntastic/blob/master/doc/syntastic-checkers.txt +[bug_tracker]: https://github.com/vim-syntastic/syntastic/issues +[checkers]: https://github.com/vim-syntastic/syntastic/blob/master/doc/syntastic-checkers.txt [crystal]: https://github.com/rhysd/vim-crystal [eastwood]: https://github.com/venantius/vim-eastwood [ghcmod]: https://github.com/eagletmt/ghcmod-vim [google_group]: https://groups.google.com/group/vim-syntastic -[guide]: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide +[guide]: https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checker-Guide [jedi]: https://github.com/davidhalter/jedi-vim [merlin]: https://github.com/the-lambda-church/merlin [myint]: https://github.com/myint/syntastic-extras diff --git a/sources_non_forked/syntastic/autoload/syntastic/log.vim b/sources_non_forked/syntastic/autoload/syntastic/log.vim index 5ad562d2..d6d41a26 100644 --- a/sources_non_forked/syntastic/autoload/syntastic/log.vim +++ b/sources_non_forked/syntastic/autoload/syntastic/log.vim @@ -21,7 +21,7 @@ function! syntastic#log#warn(msg) abort " {{{2 endfunction " }}}2 function! syntastic#log#error(msg) abort " {{{2 - execute "normal \" + execute 'normal! \' 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([]) ? diff --git a/sources_non_forked/syntastic/autoload/syntastic/util.vim b/sources_non_forked/syntastic/autoload/syntastic/util.vim index 535d2671..deeb0f1f 100644 --- a/sources_non_forked/syntastic/autoload/syntastic/util.vim +++ b/sources_non_forked/syntastic/autoload/syntastic/util.vim @@ -37,8 +37,24 @@ function! syntastic#util#system(command) abort " {{{2 let $LC_MESSAGES = 'C' let $LC_ALL = '' + let crashed = 0 let cmd_start = reltime() - let out = system(a:command) + try + let out = system(a:command) + catch + let crashed = 1 + call syntastic#log#error('exception running system(' . string(a:command) . '): ' . v:exception) + if syntastic#util#isRunningWindows() + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TMP = ' . string($TMP) . ', $TEMP = ' . string($TEMP)) + else + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TERM = ' . string($TERM)) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TMPDIR = ' . string($TMPDIR)) + endif + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, '$PATH = ' . string($PATH)) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'getcwd() = ' . string(getcwd())) + call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, g:_SYNTASTIC_SHELL_OPTIONS) + let out = '' + endtry let cmd_time = split(reltimestr(reltime(cmd_start)))[0] let $LC_ALL = old_lc_all @@ -46,7 +62,7 @@ function! syntastic#util#system(command) abort " {{{2 let &shell = old_shell - if exists('g:_SYNTASTIC_DEBUG_TRACE') + if !crashed && exists('g:_SYNTASTIC_DEBUG_TRACE') call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'system: command run in ' . cmd_time . 's') endif @@ -102,6 +118,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 +146,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 +195,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 +416,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 +537,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 +588,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 +602,18 @@ endfunction " }}}2 let s:_float2str = function(has('float') ? 's:_float2str_smart' : 's:_float2str_dumb') lockvar s:_float2str +function! s:_getbufvar_dumb(buf, name, ...) abort " {{{2 + let ret = getbufvar(a:buf, a:name) + if a:0 && type(ret) == type('') && ret ==# '' + unlet! ret + let ret = a:1 + endif + return ret +endfunction "}}}2 + +let s:_getbufvar = function(v:version > 703 || (v:version == 703 && has('patch831')) ? 'getbufvar' : 's:_getbufvar_dumb') +lockvar s:_getbufvar + " }}}1 let &cpo = s:save_cpo diff --git a/sources_non_forked/syntastic/doc/syntastic-checkers.txt b/sources_non_forked/syntastic/doc/syntastic-checkers.txt index 4541ddf2..b7625f1d 100644 --- a/sources_non_forked/syntastic/doc/syntastic-checkers.txt +++ b/sources_non_forked/syntastic/doc/syntastic-checkers.txt @@ -117,6 +117,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang* Vala.....................................|syntastic-checkers-vala| Verilog..................................|syntastic-checkers-verilog| VHDL.....................................|syntastic-checkers-vhdl| + Vim help.................................|syntastic-checkers-help| VimL.....................................|syntastic-checkers-vim| xHTML....................................|syntastic-checkers-xhtml| @@ -353,6 +354,7 @@ SYNTAX CHECKERS FOR ASCIIDOC *syntastic-checkers-asciidoc* The following checkers are available for AsciiDoc (filetype "asciidoc"): 1. Asciidoc.................|syntastic-asciidoc-asciidoc| + 2. proselint................|syntastic-asciidoc-proselint| ------------------------------------------------------------------------------ 1. Asciidoc *syntastic-asciidoc-asciidoc* @@ -374,6 +376,27 @@ Checker options~ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. +------------------------------------------------------------------------------ +2. proselint *syntastic-asciidoc-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-help-proselint|, |syntastic-html-proselint|, +|syntastic-markdown-proselint|, |syntastic-nroff-proselint|, +|syntastic-pod-proselint|, |syntastic-rst-proselint|, +|syntastic-tex-proselint|, |syntastic-texinfo-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + ============================================================================== SYNTAX CHECKERS FOR ASSEMBLY LANGUAGES *syntastic-checkers-asm* @@ -1986,7 +2009,7 @@ Security~ This checker executes the code in the files it checks: - https://github.com/scrooloose/syntastic/issues/1141 + https://github.com/vim-syntastic/syntastic/issues/1141 This is probably fine if you wrote the files yourself, but it can be a problem if you're trying to check third party files. If you are 100% willing to let @@ -2254,6 +2277,13 @@ Type: string Default: unset Additional arguments to pass to "cgc". +Note~ + +You probably also need a plugin to set |filetype| for OpenGL files, such as +"vim-glsl": + + https://github.com/tikhomirov/vim-glsl + ============================================================================== SYNTAX CHECKERS FOR GO *syntastic-checkers-go* @@ -2586,10 +2616,12 @@ The following checkers are available for HTML (filetype "html"): 1. ESLint...................|syntastic-html-eslint| 2. gjslint..................|syntastic-html-gjslint| 3. HTML tidy................|syntastic-html-tidy| - 4. JSHint...................|syntastic-html-jshint| - 5. textlint.................|syntastic-html-textlint| - 6. Validator................|syntastic-html-validator| - 7. W3.......................|syntastic-html-w3| + 4. HTMLHint.................|syntastic-html-htmlhint| + 5. JSHint...................|syntastic-html-jshint| + 6. proselint................|syntastic-html-proselint| + 7. textlint.................|syntastic-html-textlint| + 8. Validator................|syntastic-html-validator| + 9. W3.......................|syntastic-html-w3| ------------------------------------------------------------------------------ 1. ESLint *syntastic-html-eslint* @@ -2679,7 +2711,25 @@ List of additional empty tags, to be added to "--new-empty-tags". See also: |syntastic-xhtml-tidy|. ------------------------------------------------------------------------------ -4. jshint *syntastic-html-jshint* +4. HTMLHint *syntastic-html-htmlhint* + +Name: HTMLHint +Maintainer: LCD 47 + +"JSHint" is a static code analysis tool for HTML. See the project's page for +details: + + http://htmlhint.com/ + +Syntastic requires "HTMLHint" version 0.9.13 or later. + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +------------------------------------------------------------------------------ +5. jshint *syntastic-html-jshint* Name: JSHint Maintainer: LCD 47 @@ -2725,7 +2775,28 @@ in "JSHint". If that is undesirable, your only other option is to leave See also: |syntastic-javascript-jshint|, |syntastic-xhtml-jshint|. ------------------------------------------------------------------------------ -5. textlint *syntastic-html-textlint* +6. proselint *syntastic-html-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-markdown-proselint|, |syntastic-nroff-proselint|, +|syntastic-pod-proselint|, |syntastic-rst-proselint|, +|syntastic-tex-proselint|, |syntastic-texinfo-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + +------------------------------------------------------------------------------ +7. textlint *syntastic-html-textlint* Name: textlint Maintainer: LCD 47 @@ -2750,7 +2821,7 @@ work: See also: |syntastic-markdown-textlint|, |syntastic-text-textlint|. ------------------------------------------------------------------------------ -6. Validator *syntastic-html-validator* +8. Validator *syntastic-html-validator* Name: validator Maintainer: LCD 47 @@ -2823,7 +2894,7 @@ You can lookup the meaning of these codes in cURL's manual: http://curl.haxx.se/docs/manpage.html#EXIT ------------------------------------------------------------------------------ -7. W3 *syntastic-html-w3* +9. W3 *syntastic-html-w3* Name: w3 Maintainer: Martin Grenfell @@ -2949,6 +3020,14 @@ Name: javac Maintainers: Jochen Keil Dmitry Geurkov +Note~ + +This checker is not suitable for use with large Java projects. The design +of "javac" makes this checker prone to running into various limitations of +your shell, Vim, and your Java compiler. You are strongly advised to use +something like Eclim (http://eclim.org/) instead of syntastic for projects of +any substantial size or complexity. + Commands~ The following commands are available: @@ -3684,7 +3763,8 @@ SYNTAX CHECKERS FOR MARKDOWN *syntastic-checkers-markdown* The following checkers are available for Markdown (filetype "markdown"): 1. Markdown lint tool.......|syntastic-markdown-mdl| - 2. textlint.................|syntastic-markdown-textlint| + 2. proselint................|syntastic-markdown-proselint| + 3. textlint.................|syntastic-markdown-textlint| ------------------------------------------------------------------------------ 1. Markdown lint tool *syntastic-markdown-mdl* @@ -3721,7 +3801,28 @@ to a set of valid "markdownlint-cli" options): > let g:syntastic_markdown_mdl_args = "" < ------------------------------------------------------------------------------ -2. textlint *syntastic-markdown-textlint* +2. proselint *syntastic-markdown-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-html-proselint|, |syntastic-nroff-proselint|, +|syntastic-pod-proselint|, |syntastic-rst-proselint|, +|syntastic-tex-proselint|, |syntastic-texinfo-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + +------------------------------------------------------------------------------ +3. textlint *syntastic-markdown-textlint* Name: textlint Maintainer: LCD 47 @@ -3836,6 +3937,7 @@ The following checkers are available for nroff (filetype "nroff"): 1. Igor.....................|syntastic-nroff-igor| 2. mandoc...................|syntastic-nroff-mandoc| + 3. proselint................|syntastic-nroff-proselint| ------------------------------------------------------------------------------ 1. Igor *syntastic-nroff-igor* @@ -3875,6 +3977,27 @@ Checker options~ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. +------------------------------------------------------------------------------ +3. proselint *syntastic-nroff-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-html-proselint|, |syntastic-markdown-proselint|, +|syntastic-pod-proselint|, |syntastic-rst-proselint|, +|syntastic-tex-proselint|, |syntastic-texinfo-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + ============================================================================== SYNTAX CHECKERS FOR OBJECTIVE-C *syntastic-checkers-objc* @@ -4362,6 +4485,7 @@ SYNTAX CHECKERS FOR POD *syntastic-checkers-pod* The following checkers are available for POD (filetype "pod"): 1. Pod::Checker.............|syntastic-pod-podchecker| + 2. proselint................|syntastic-pod-proselint| ------------------------------------------------------------------------------ 1. Pod::Checker *syntastic-pod-podchecker* @@ -4381,6 +4505,27 @@ accepts the standard options described at |syntastic-config-makeprg|. See also: |syntastic-perl-podchecker|. +------------------------------------------------------------------------------ +2. proselint *syntastic-pod-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-html-proselint|, |syntastic-markdown-proselint|, +|syntastic-nroff-proselint|, |syntastic-rst-proselint|, +|syntastic-tex-proselint|, |syntastic-texinfo-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + ============================================================================== SYNTAX CHECKERS FOR PUG (FORMERLY JADE) *syntastic-checkers-pug* @@ -4985,7 +5130,7 @@ Security~ This checker executes the code in the files it checks: - https://github.com/scrooloose/syntastic/issues/1773 + https://github.com/vim-syntastic/syntastic/issues/1773 This is probably fine if you wrote the files yourself, but it can be a problem if you're trying to check third party files. If you are 100% willing to let @@ -5034,12 +5179,34 @@ SYNTAX CHECKERS FOR RESTRUCTUREDTEXT *syntastic-checkers-rst* The following checkers are available for reStructuredText (filetype "rst"): - 1. rst2pseudoxml............|syntastic-rst-rst2pseudoxml| - 2. rstcheck.................|syntastic-rst-rstcheck| - 3. Sphinx...................|syntastic-rst-sphinx| + 1. proselint................|syntastic-rst-proselint| + 2. rst2pseudoxml............|syntastic-rst-rst2pseudoxml| + 3. rstcheck.................|syntastic-rst-rstcheck| + 4. Sphinx...................|syntastic-rst-sphinx| ------------------------------------------------------------------------------ -1. rst2pseudoxml *syntastic-rst-rst2pseudoxml* +1. proselint *syntastic-rst-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-html-proselint|, |syntastic-markdown-proselint|, +|syntastic-nroff-proselint|, |syntastic-pod-proselint|, +|syntastic-tex-proselint|, |syntastic-texinfo-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + +------------------------------------------------------------------------------ +2. rst2pseudoxml *syntastic-rst-rst2pseudoxml* Name: rst2pseudoxml Maintainer: James Rowe @@ -5057,7 +5224,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. ------------------------------------------------------------------------------ -2. rstcheck *syntastic-rst-rstcheck* +3. rstcheck *syntastic-rst-rstcheck* Name: rstcheck Maintainer: Steven Myint @@ -5073,7 +5240,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. ------------------------------------------------------------------------------ -3. Sphinx *syntastic-rst-sphinx* +4. Sphinx *syntastic-rst-sphinx* Name: sphinx Maintainer: Buck Evan @@ -5850,7 +6017,7 @@ Maintainer: LCD 47 "Stylint" is a linter for Stylus (http://learnboost.github.io/stylus). See the project's page at GitHub for details: - https://github.com/rossPatton/stylint + https://github.com/SimenB/stylint Checker options~ @@ -5892,6 +6059,7 @@ The following checkers are available for TeX (filetype "tex"): 1. ChkTeX...................|syntastic-tex-chktex| 2. lacheck..................|syntastic-tex-lacheck| + 3. proselint................|syntastic-tex-proselint| ------------------------------------------------------------------------------ 1. ChkTeX *syntastic-tex-chktex* @@ -5937,12 +6105,34 @@ Limitations~ At the time of this writing "lacheck" can't expand "\def" commands. As a result, most "\input" commands using macros are signaled as errors. +------------------------------------------------------------------------------ +3. proselint *syntastic-tex-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-html-proselint|, |syntastic-markdown-proselint|, +|syntastic-nroff-proselint|, |syntastic-pod-proselint|, +|syntastic-rst-proselint|, |syntastic-texinfo-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + ============================================================================== SYNTAX CHECKERS FOR TEXINFO *syntastic-checkers-texinfo* The following checkers are available for Texinfo (filetype "texinfo"): 1. Makeinfo.................|syntastic-texinfo-makeinfo| + 2. proselint................|syntastic-texinfo-proselint| ------------------------------------------------------------------------------ 1. Makeinfo *syntastic-texinfo-makeinfo* @@ -5960,6 +6150,27 @@ Checker options~ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. +------------------------------------------------------------------------------ +2. proselint *syntastic-texinfo-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-html-proselint|, |syntastic-markdown-proselint|, +|syntastic-nroff-proselint|, |syntastic-pod-proselint|, +|syntastic-rst-proselint|, |syntastic-tex-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + ============================================================================== SYNTAX CHECKERS FOR TEXT *syntastic-checkers-text* @@ -5968,7 +6179,8 @@ The following checkers are available for plain text (filetype "text"): 1. atdtool..................|syntastic-text-atdtool| 2. Igor.....................|syntastic-text-igor| 3. language-check...........|syntastic-text-language_check| - 4. textlint.................|syntastic-text-textlint| + 4. proselint................|syntastic-text-proselint| + 5. textlint.................|syntastic-text-textlint| ------------------------------------------------------------------------------ 1. atdtool *syntastic-text-atdtool* @@ -6031,7 +6243,28 @@ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. ------------------------------------------------------------------------------ -4. textlint *syntastic-text-textlint* +4. proselint *syntastic-text-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-html-proselint|, |syntastic-markdown-proselint|, +|syntastic-nroff-proselint|, |syntastic-pod-proselint|, +|syntastic-rst-proselint|, |syntastic-tex-proselint|, +|syntastic-texinfo-proselint|, |syntastic-xhtml-proselint|. + +------------------------------------------------------------------------------ +5. textlint *syntastic-text-textlint* Name: textlint Maintainer: LCD 47 @@ -6394,6 +6627,34 @@ Checker options~ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. +============================================================================== +SYNTAX CHECKERS FOR VIM HELP *syntastic-checkers-help* + +The following checkers are available for Vim help (filetype "help"): + + 1. proselint................|syntastic-help-proselint| + +------------------------------------------------------------------------------ +1. proselint *syntastic-help-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-html-proselint|, +|syntastic-markdown-proselint|, |syntastic-nroff-proselint|, +|syntastic-pod-proselint|, |syntastic-rst-proselint|, +|syntastic-tex-proselint|, |syntastic-texinfo-proselint|, +|syntastic-text-proselint|, |syntastic-xhtml-proselint|. + ============================================================================== SYNTAX CHECKERS FOR VIML *syntastic-checkers-vim* @@ -6479,6 +6740,7 @@ The following checkers are available for xHTML (filetype "xhtml"): 1. HTML Tidy................|syntastic-xhtml-tidy| 2. jshint...................|syntastic-xhtml-jshint| + 3. proselint................|syntastic-xhtml-proselint| ------------------------------------------------------------------------------ 1. HTML tidy *syntastic-xhtml-tidy* @@ -6553,6 +6815,27 @@ in "JSHint". If that is undesirable, your only other option is to leave < See also: |syntastic-html-jshint|, |syntastic-javascript-jshint|. +------------------------------------------------------------------------------ +3. proselint *syntastic-xhtml-proselint* + +Name: proselint +Maintainer: LCD 47 + +"proselint" is a linter for prose. See the page for details: + + http://proselint.com/ + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-asciidoc-proselint|, |syntastic-help-proselint|, +|syntastic-html-proselint|, |syntastic-markdown-proselint|, +|syntastic-nroff-proselint|, |syntastic-pod-proselint|, +|syntastic-rst-proselint|, |syntastic-tex-proselint|, +|syntastic-texinfo-proselint|, |syntastic-text-proselint|. + ============================================================================== SYNTAX CHECKERS FOR XML *syntastic-checkers-xml* diff --git a/sources_non_forked/syntastic/doc/syntastic.txt b/sources_non_forked/syntastic/doc/syntastic.txt index 8f3473bc..db3e99e4 100644 --- a/sources_non_forked/syntastic/doc/syntastic.txt +++ b/sources_non_forked/syntastic/doc/syntastic.txt @@ -48,19 +48,20 @@ CONTENTS *syntastic-contents* 7.Compatibility with other software............|syntastic-compatibility| 7.1.airline................................|syntastic-airline| 7.2.The csh and tcsh shells................|syntastic-csh| - 7.3.Eclim..................................|syntastic-eclim| - 7.4.ferret.................................|syntastic-ferret| - 7.5.The fish shell.........................|syntastic-fish| - 7.6.The fizsh shell........................|syntastic-fizsh| - 7.7.flagship...............................|syntastic-flagship| - 7.8.powerline..............................|syntastic-powerline| - 7.9.The PowerShell shell...................|syntastic-powershell| - 7.10.python-mode...........................|syntastic-pymode| - 7.11.vim-auto-save.........................|syntastic-vim-auto-save| - 7.12.vim-go................................|syntastic-vim-go| - 7.13.vim-virtualenv........................|syntastic-vim-virtualenv| - 7.14.YouCompleteMe.........................|syntastic-ycm| - 7.15.The zsh shell and MacVim..............|syntastic-zsh| + 7.3.EasyGrep...............................|syntastic-easygrep| + 7.4.Eclim..................................|syntastic-eclim| + 7.5.ferret.................................|syntastic-ferret| + 7.6.The fish shell.........................|syntastic-fish| + 7.7.The fizsh shell........................|syntastic-fizsh| + 7.8.flagship...............................|syntastic-flagship| + 7.9.powerline..............................|syntastic-powerline| + 7.10.The PowerShell shell..................|syntastic-powershell| + 7.11.python-mode...........................|syntastic-pymode| + 7.12.vim-auto-save.........................|syntastic-vim-auto-save| + 7.13.vim-go................................|syntastic-vim-go| + 7.14.vim-virtualenv........................|syntastic-vim-virtualenv| + 7.15.YouCompleteMe.........................|syntastic-ycm| + 7.16.The zsh shell and MacVim..............|syntastic-zsh| 8.About........................................|syntastic-about| 9.License......................................|syntastic-license| @@ -84,7 +85,7 @@ Take a look at the list of supported filetypes and checkers: |syntastic-checkers Note: This doc only deals with using syntastic. To learn how to write syntax checker integrations, see the guide on the GitHub wiki: - https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide + https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checker-Guide ------------------------------------------------------------------------------ 1.1. Quick start *syntastic-quickstart* @@ -301,12 +302,22 @@ the order specified. The set by |'syntastic_aggregate_errors'| still apply. Example: > :SyntasticCheck flake8 pylint < +You can also run checkers for filetypes different from the current filetype +by qualifying their names with their respective filetypes, like this: +"/". + +Example: > + :SyntasticCheck lacheck text/language_check +< :SyntasticInfo *:SyntasticInfo* The command takes an optional argument, and outputs information about the checkers available for the filetype named by said argument, or for the current filetype if no argument was provided. +Example: > + :SyntasticInfo python +< :SyntasticReset *:SyntasticReset* Resets the list of errors and turns off all error notifiers. @@ -761,6 +772,10 @@ If neither |'g:syntastic__checkers'| nor |'b:syntastic_checkers'| is set, a default list of checker is used. Beware however that this list deliberately kept minimal, for performance reasons. +You can specify checkers for other filetypes anywhere in these lists, by +qualifying their names with their respective filetypes: > + let g:syntastic_tex_checkers = ["lacheck", "text/language_check"] +< Take a look elsewhere in this manual to find out what checkers and filetypes are supported by syntastic: |syntastic-checkers|. @@ -854,9 +869,8 @@ omitting the filename from the command line: > let g:syntastic_sml_smlnj_fname = "" < *syntastic-config-no-makeprgbuild* -For checkers that do not use the "makeprgBuild()" function you will have to -look at the source code of the checker in question. If there are specific -options that can be set they are normally documented in this manual (see +For checkers that do not use the "makeprgBuild()" function any specific +options that can be set should be documented in this manual (see |syntastic-checkers|). ------------------------------------------------------------------------------ @@ -1017,7 +1031,16 @@ such as "zsh", "bash", "ksh", or even the original Bourne "sh": > let g:syntastic_shell = "/bin/sh" < ------------------------------------------------------------------------------ -7.3. Eclim *syntastic-eclim* +7.3. EasyGrep *syntastic-easygrep* + +The "EasyGrep" Vim plugin (https://github.com/dkprice/vim-easygrep) can use +either |quickfix| lists, or location lists (see |location-list|). Syntastic can +be run along with "EasyGrep" provided that the latter is configured to use +|quickfix| lists (which is the default at the time of this writing): > + let g:EasyGrepWindow = 0 +< +------------------------------------------------------------------------------ +7.4. Eclim *syntastic-eclim* Syntastic can be used together with "Eclim" (see http://eclim.org/). However, by default Eclim disables syntastic's checks for the filetypes it supports, in @@ -1030,7 +1053,7 @@ run Eclim's validation for others. Please consult Eclim's documentation for details. ------------------------------------------------------------------------------ -7.4. ferret *syntastic-ferret* +7.5. ferret *syntastic-ferret* At the time of this writing syntastic conflicts with the "ferret" Vim plugin (https://github.com/wincent/ferret). The "ferret" plugin assumes control over @@ -1038,7 +1061,7 @@ loclist windows even when configured to use |quickfix| lists. This interferes with syntastic's functioning. ------------------------------------------------------------------------------ -7.5. The fish shell *syntastic-fish* +7.6. The fish shell *syntastic-fish* At the time of this writing the "fish" shell (see http://fishshell.com/) doesn't support the standard UNIX syntax for file redirections, and thus it @@ -1048,7 +1071,7 @@ original Bourne "sh": > let g:syntastic_shell = "/bin/sh" < ------------------------------------------------------------------------------ -7.6. The fizsh shell *syntastic-fizsh* +7.7. The fizsh shell *syntastic-fizsh* Using syntastic with the "fizsh" shell (see https://github.com/zsh-users/fizsh) is possible, but potentially problematic. In order to do it you'll need to set @@ -1061,7 +1084,7 @@ interactive features of "fizsh". Using a more traditional shell such as "zsh", let g:syntastic_shell = "/bin/sh" < ------------------------------------------------------------------------------ -7.7. flagship *syntastic-flagship* +7.8. flagship *syntastic-flagship* The "flagship" Vim plugin (https://github.com/tpope/vim-flagship) has its own mechanism of showing flags on the |'statusline'|. To allow "flagship" @@ -1071,7 +1094,7 @@ described in the |syntastic-statusline-flag| section above: > autocmd User Flags call Hoist("window", "SyntasticStatuslineFlag") < ------------------------------------------------------------------------------ -7.8. powerline *syntastic-powerline* +7.9. powerline *syntastic-powerline* The "powerline" Vim plugin (https://github.com/powerline/powerline) comes packaged with a syntastic segment. To customize this segment create a file @@ -1088,7 +1111,7 @@ packaged with a syntastic segment. To customize this segment create a file } < ------------------------------------------------------------------------------ -7.9. The PowerShell shell *syntastic-powershell* +7.10. The PowerShell shell *syntastic-powershell* At the time of this writing syntastic is not compatible with using "PowerShell" (https://msdn.microsoft.com/en-us/powershell) as Vim's 'shell'. @@ -1099,7 +1122,7 @@ You may still run Vim from "PowerShell", but you do have to point Vim's set shell=/bin/sh < ------------------------------------------------------------------------------ -7.10. python-mode *syntastic-pymode* +7.11. python-mode *syntastic-pymode* Syntastic can be used along with the "python-mode" Vim plugin (see https://github.com/klen/python-mode). However, they both run syntax checks by @@ -1110,14 +1133,14 @@ for python in syntastic (see |'syntastic_mode_map'|), or disable lint checks in let g:pymode_lint_on_write = 0 < ------------------------------------------------------------------------------ -7.11. vim-auto-save *syntastic-vim-auto-save* +7.12. vim-auto-save *syntastic-vim-auto-save* Syntastic can be used together with the "vim-auto-save" Vim plugin (see https://github.com/907th/vim-auto-save). However, syntastic checks in active mode only work with "vim-auto-save" version 0.1.7 or later. ------------------------------------------------------------------------------ -7.12. vim-go *syntastic-vim-go* +7.13. vim-go *syntastic-vim-go* Syntastic can be used along with the "vim-go" Vim plugin (see https://github.com/fatih/vim-go). However, both "vim-go" and syntastic run @@ -1134,7 +1157,7 @@ stick with |quickfix| lists: > let g:go_list_type = "quickfix" < ------------------------------------------------------------------------------ -7.13. vim-virtualenv *syntastic-vim-virtualenv* +7.14. vim-virtualenv *syntastic-vim-virtualenv* At the time of this writing, syntastic can't run checkers installed in Python virtual environments activated by "vim-virtualenv" (see @@ -1142,7 +1165,7 @@ https://github.com/jmcantrell/vim-virtualenv). This is a limitation of "vim-virtualenv". ------------------------------------------------------------------------------ -7.14. YouCompleteMe *syntastic-ycm* +7.15. YouCompleteMe *syntastic-ycm* Syntastic can be used together with the "YouCompleteMe" Vim plugin (see http://valloric.github.io/YouCompleteMe/). However, by default "YouCompleteMe" @@ -1153,7 +1176,7 @@ have to set |g:ycm_show_diagnostics_ui| to 0. E.g.: > let g:ycm_show_diagnostics_ui = 0 < ------------------------------------------------------------------------------ -7.15. The zsh shell and MacVim *syntastic-zsh* +7.16. The zsh shell and MacVim *syntastic-zsh* If you're running MacVim together with the "zsh" shell (http://www.zsh.org/) you need to be aware that MacVim does not source your .zshrc file, but will @@ -1173,7 +1196,7 @@ The core maintainers of syntastic are: Find the latest version of syntastic at: - http://github.com/scrooloose/syntastic + http://github.com/vim-syntastic/syntastic ============================================================================== 9. License *syntastic-license* diff --git a/sources_non_forked/syntastic/plugin/syntastic.vim b/sources_non_forked/syntastic/plugin/syntastic.vim index 94b141ac..2c8bdbad 100644 --- a/sources_non_forked/syntastic/plugin/syntastic.vim +++ b/sources_non_forked/syntastic/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.7.0-226' +let g:_SYNTASTIC_VERSION = '3.8.0-10' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 @@ -57,7 +57,7 @@ elseif executable('uname') try let g:_SYNTASTIC_UNAME = split(syntastic#util#system('uname'), "\n")[0] catch /\m^Vim\%((\a\+)\)\=:E484/ - call syntastic#log#error("your shell " . syntastic#util#var('shell') . " can't handle traditional UNIX syntax for redirections") + call syntastic#log#error("can't run external programs (misconfigured shell options?)") finish catch /\m^Vim\%((\a\+)\)\=:E684/ let g:_SYNTASTIC_UNAME = 'Unknown' @@ -126,7 +126,7 @@ endif " Debug {{{1 -let s:_DEBUG_DUMP_OPTIONS = [ +let g:_SYNTASTIC_SHELL_OPTIONS = [ \ 'shell', \ 'shellcmdflag', \ 'shellpipe', @@ -136,16 +136,16 @@ let s:_DEBUG_DUMP_OPTIONS = [ \ 'shellxquote' \ ] for s:feature in [ - \ 'shellxescape', - \ 'shellslash', \ 'autochdir', + \ 'shellslash', + \ 'shellxescape', \ ] if exists('+' . s:feature) - call add(s:_DEBUG_DUMP_OPTIONS, s:feature) + call add(g:_SYNTASTIC_SHELL_OPTIONS, s:feature) endif endfor -lockvar! s:_DEBUG_DUMP_OPTIONS +lockvar! g:_SYNTASTIC_SHELL_OPTIONS " debug constants let g:_SYNTASTIC_DEBUG_TRACE = 1 @@ -178,11 +178,20 @@ let s:_quit_pre = [] " @vimlint(EVL103, 1, a:cmdLine) " @vimlint(EVL103, 1, a:argLead) function! s:CompleteCheckerName(argLead, cmdLine, cursorPos) abort " {{{2 - let checker_names = [] - for ft in s:_resolve_filetypes([]) - call extend(checker_names, s:registry.getNamesOfAvailableCheckers(ft)) - endfor - return join(checker_names, "\n") + let names = [] + + let sep_idx = stridx(a:argLead, '/') + if sep_idx >= 1 + let ft = a:argLead[: sep_idx-1] + call extend(names, map( s:registry.getNamesOfAvailableCheckers(ft), 'ft . "/" . v:val' )) + else + for ft in s:registry.resolveFiletypes(&filetype) + call extend(names, s:registry.getNamesOfAvailableCheckers(ft)) + endfor + call extend(names, map( copy(s:registry.getKnownFiletypes()), 'v:val . "/"' )) + endif + + return join(names, "\n") endfunction " }}}2 " @vimlint(EVL103, 0, a:cursorPos) " @vimlint(EVL103, 0, a:cmdLine) @@ -220,9 +229,9 @@ endfunction " }}}2 function! SyntasticInfo(...) abort " {{{2 call s:modemap.modeInfo(a:000) - call s:registry.echoInfoFor(s:_resolve_filetypes(a:000)) + call s:registry.echoInfoFor(a:000) call s:_explain_skip(a:000) - call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, s:_DEBUG_DUMP_OPTIONS) + call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, g:_SYNTASTIC_SHELL_OPTIONS) call syntastic#log#debugDump(g:_SYNTASTIC_DEBUG_VARIABLES) endfunction " }}}2 @@ -312,7 +321,7 @@ function! s:BufEnterHook(fname) abort " {{{2 " TODO: this is needed because in recent versions of Vim lclose " can no longer be called from BufWinLeave " TODO: at this point there is no b:syntastic_loclist - let loclist = filter(copy(getloclist(0)), 'v:val["valid"] == 1') + let loclist = filter(copy(getloclist(0)), 'v:val["valid"]') let owner = str2nr(getbufvar(buf, 'syntastic_owner_buffer')) let buffers = syntastic#util#unique(map(loclist, 'v:val["bufnr"]') + (owner ? [owner] : [])) if !empty(get(w:, 'syntastic_loclist_set', [])) && !empty(loclist) && empty(filter( buffers, 'syntastic#util#bufIsActive(v:val)' )) @@ -373,7 +382,7 @@ endfunction " }}}2 "refresh and redraw all the error info for this buf when saving or reading function! s:UpdateErrors(buf, auto_invoked, checker_names) abort " {{{2 call syntastic#log#debugShowVariables(g:_SYNTASTIC_DEBUG_TRACE, 'version') - call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, s:_DEBUG_DUMP_OPTIONS) + call syntastic#log#debugShowOptions(g:_SYNTASTIC_DEBUG_TRACE, g:_SYNTASTIC_SHELL_OPTIONS) call syntastic#log#debugDump(g:_SYNTASTIC_DEBUG_VARIABLES) call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'UpdateErrors' . (a:auto_invoked ? ' (auto)' : '') . \ ': ' . (len(a:checker_names) ? join(a:checker_names) : 'default checkers')) @@ -384,14 +393,12 @@ function! s:UpdateErrors(buf, auto_invoked, checker_names) abort " {{{2 return endif - let run_checks = !a:auto_invoked || s:modemap.doAutoChecking() + let run_checks = !a:auto_invoked || s:modemap.doAutoChecking(a:buf) if run_checks call s:CacheErrors(a:buf, a:checker_names) call syntastic#util#setLastTick(a:buf) - else - if a:auto_invoked - return - endif + elseif a:auto_invoked + return endif let loclist = g:SyntasticLoclist.current(a:buf) @@ -448,25 +455,27 @@ function! s:CacheErrors(buf, checker_names) abort " {{{2 if !s:_skip_file(a:buf) " debug logging {{{3 call syntastic#log#debugShowVariables(g:_SYNTASTIC_DEBUG_TRACE, 'aggregate_errors') - call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TERM = ' . string($TERM)) + if syntastic#util#isRunningWindows() + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TMP = ' . string($TMP) . ', $TEMP = ' . string($TEMP)) + else + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TERM = ' . string($TERM)) + call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$TMPDIR = ' . string($TMPDIR)) + endif call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, '$PATH = ' . string($PATH)) call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'getcwd() = ' . string(getcwd())) " }}}3 - let filetypes = s:_resolve_filetypes([]) - let aggregate_errors = syntastic#util#var('aggregate_errors') || len(filetypes) > 1 + let clist = s:registry.getCheckers(getbufvar(a:buf, '&filetype'), a:checker_names) + + let aggregate_errors = + \ syntastic#util#var('aggregate_errors') || len(syntastic#util#unique(map(copy(clist), 'v:val.getFiletype()'))) > 1 let decorate_errors = aggregate_errors && syntastic#util#var('id_checkers') let sort_aggregated_errors = aggregate_errors && syntastic#util#var('sort_aggregated_errors') - let clist = [] - for type in filetypes - call extend(clist, s:registry.getCheckers(type, a:checker_names)) - endfor - let names = [] let unavailable_checkers = 0 for checker in clist - let cname = checker.getFiletype() . '/' . checker.getName() + let cname = checker.getCName() if !checker.isAvailable() call syntastic#log#debug(g:_SYNTASTIC_DEBUG_TRACE, 'CacheErrors: Checker ' . cname . ' is not available') let unavailable_checkers += 1 @@ -687,11 +696,6 @@ endfunction " }}}2 " Utilities {{{1 -function! s:_resolve_filetypes(filetypes) abort " {{{2 - let type = len(a:filetypes) ? a:filetypes[0] : &filetype - return split( get(g:syntastic_filetype_map, type, type), '\m\.' ) -endfunction " }}}2 - function! s:_ignore_file(filename) abort " {{{2 let fname = fnamemodify(a:filename, ':p') for pattern in g:syntastic_ignore_files diff --git a/sources_non_forked/syntastic/plugin/syntastic/checker.vim b/sources_non_forked/syntastic/plugin/syntastic/checker.vim index 22ad8205..345d2f03 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/checker.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/checker.vim @@ -15,7 +15,7 @@ function! g:SyntasticChecker.New(args, ...) abort " {{{2 if a:0 " redirected checker - let newObj._exec = get(a:args, 'exec', a:1['_exec']) + let newObj._exec_default = get(a:args, 'exec', a:1['_exec_default']) let filetype = a:1['_filetype'] let name = a:1['_name'] @@ -31,7 +31,10 @@ function! g:SyntasticChecker.New(args, ...) abort " {{{2 let newObj._enable = a:1['_enable'] endif else - let newObj._exec = get(a:args, 'exec', newObj._name) + let newObj._exec_default = get(a:args, 'exec', newObj._name) + if newObj._exec_default ==# '' + let newObj._exec_default = '' + endif let prefix = 'SyntaxCheckers_' . newObj._filetype . '_' . newObj._name . '_' if has_key(a:args, 'enable') @@ -62,23 +65,24 @@ function! g:SyntasticChecker.getName() abort " {{{2 return self._name endfunction " }}}2 +function! g:SyntasticChecker.getCName() abort " {{{2 + return self._filetype . '/' . self._name +endfunction " }}}2 + " Synchronise _exec with user's setting. Force re-validation if needed. " " XXX: This function must be called at least once before calling either " getExec() or getExecEscaped(). Normally isAvailable() does that for you " automatically, but you should keep still this in mind if you change the " current checker workflow. -function! g:SyntasticChecker.syncExec() abort " {{{2 - let user_exec = - \ expand( exists('b:syntastic_' . self._name . '_exec') ? b:syntastic_{self._name}_exec : - \ syntastic#util#var(self._filetype . '_' . self._name . '_exec'), 1 ) - - if user_exec !=# '' && user_exec !=# self._exec - let self._exec = user_exec - if has_key(self, '_available') - " we have a new _exec on the block, it has to be validated - call remove(self, '_available') - endif +function! g:SyntasticChecker.syncExec(...) abort " {{{2 + if a:0 + let self._exec = a:1 + else + let suffix = self._name . '_exec' + let self._exec = expand( + \ syntastic#util#var(self._filetype . '_' . suffix, + \ syntastic#util#var(suffix, self._exec_default)), 1 ) endif endfunction " }}}2 @@ -92,7 +96,7 @@ endfunction " }}}2 function! g:SyntasticChecker.getLocListRaw() abort " {{{2 let checker_start = reltime() - let name = self._filetype . '/' . self._name + let name = self.getCName() if has_key(self, '_enable') let status = syntastic#util#var(self._enable, -1) @@ -150,7 +154,7 @@ function! g:SyntasticChecker.getVersion(...) abort " {{{2 call self.setVersion(parsed_ver) else call syntastic#log#ndebug(g:_SYNTASTIC_DEBUG_LOCLIST, 'checker output:', split(version_output, "\n", 1)) - call syntastic#log#error("checker " . self._filetype . "/" . self._name . ": can't parse version string (abnormal termination?)") + call syntastic#log#error("checker " . self.getCName() . ": can't parse version string (abnormal termination?)") endif endif return get(self, '_version', []) @@ -164,8 +168,8 @@ function! g:SyntasticChecker.setVersion(version) abort " {{{2 endfunction " }}}2 function! g:SyntasticChecker.log(msg, ...) abort " {{{2 - let leader = self._filetype . '/' . self._name . ': ' - if a:0 > 0 + let leader = self.getCName() . ': ' + if a:0 call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, leader . a:msg, a:1) else call syntastic#log#debug(g:_SYNTASTIC_DEBUG_CHECKERS, leader . a:msg) @@ -187,10 +191,15 @@ endfunction " }}}2 function! g:SyntasticChecker.isAvailable() abort " {{{2 call self.syncExec() + if !has_key(self, '_available') - let self._available = self._isAvailableFunc() + let self._available = {} endif - return self._available + if !has_key(self._available, self._exec) + let self._available[self._exec] = self._isAvailableFunc() + endif + + return self._available[self._exec] endfunction " }}}2 function! g:SyntasticChecker.isDisabled() abort " {{{2 diff --git a/sources_non_forked/syntastic/plugin/syntastic/loclist.vim b/sources_non_forked/syntastic/plugin/syntastic/loclist.vim index d4a20b98..3ad93750 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/loclist.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/loclist.vim @@ -10,7 +10,7 @@ let g:SyntasticLoclist = {} function! g:SyntasticLoclist.New(rawLoclist) abort " {{{2 let newObj = copy(self) - let llist = filter(copy(a:rawLoclist), 'v:val["valid"] == 1') + let llist = filter(copy(a:rawLoclist), 'v:val["valid"]') for e in llist if get(e, 'type', '') ==# '' @@ -28,8 +28,8 @@ function! g:SyntasticLoclist.New(rawLoclist) abort " {{{2 endfunction " }}}2 function! g:SyntasticLoclist.current(...) abort " {{{2 - let buf = a:0 > 1 ? a:1 : bufnr('') - let loclist = getbufvar(buf, 'syntastic_loclist') + let buf = a:0 ? a:1 : bufnr('') + let loclist = syntastic#util#getbufvar(buf, 'syntastic_loclist', {}) if type(loclist) != type({}) || empty(loclist) unlet! loclist let loclist = g:SyntasticLoclist.New([]) @@ -281,7 +281,7 @@ endfunction " }}}2 " "would return all errors for buffer 10. " -"Note that all comparisons are done with ==? +"Note that all string comparisons are done with ==? function! g:SyntasticLoclist.filter(filters) abort " {{{2 let conditions = values(map(copy(a:filters), 's:_translate(v:key, v:val)')) let filter = len(conditions) == 1 ? diff --git a/sources_non_forked/syntastic/plugin/syntastic/modemap.vim b/sources_non_forked/syntastic/plugin/syntastic/modemap.vim index 40445b6e..74b09a71 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/modemap.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/modemap.vim @@ -29,7 +29,8 @@ function! g:SyntasticModeMap.synch() abort " {{{2 endfunction " }}}2 function! g:SyntasticModeMap.allowsAutoChecking(filetype) abort " {{{2 - let fts = split(a:filetype, '\m\.') + let registry = g:SyntasticRegistry.Instance() + let fts = registry.resolveFiletypes(a:filetype) if self.isPassive() return self._isOneFiletypeActive(fts) @@ -38,13 +39,13 @@ function! g:SyntasticModeMap.allowsAutoChecking(filetype) abort " {{{2 endif endfunction " }}}2 -function! g:SyntasticModeMap.doAutoChecking() abort " {{{2 - let local_mode = get(b:, 'syntastic_mode', '') +function! g:SyntasticModeMap.doAutoChecking(buf) abort " {{{2 + let local_mode = getbufvar(a:buf, 'syntastic_mode') if local_mode ==# 'active' || local_mode ==# 'passive' return local_mode ==# 'active' endif - return self.allowsAutoChecking(&filetype) + return self.allowsAutoChecking(getbufvar(a:buf, '&filetype')) endfunction " }}}2 function! g:SyntasticModeMap.isPassive() abort " {{{2 @@ -96,7 +97,7 @@ function! g:SyntasticModeMap.modeInfo(filetypes) abort " {{{2 echomsg 'Local mode: ' . b:syntastic_mode endif - echomsg 'The current file will ' . (self.doAutoChecking() ? '' : 'not ') . 'be checked automatically' + echomsg 'The current file will ' . (self.doAutoChecking(bufnr('')) ? '' : 'not ') . 'be checked automatically' endif endfunction " }}}2 diff --git a/sources_non_forked/syntastic/plugin/syntastic/registry.vim b/sources_non_forked/syntastic/plugin/syntastic/registry.vim index a24e283a..69ef5817 100644 --- a/sources_non_forked/syntastic/plugin/syntastic/registry.vim +++ b/sources_non_forked/syntastic/plugin/syntastic/registry.vim @@ -43,6 +43,7 @@ let s:_DEFAULT_CHECKERS = { \ 'handlebars': ['handlebars'], \ 'haskell': ['hdevtools', 'hlint'], \ 'haxe': ['haxe'], + \ 'help': [], \ 'hss': ['hss'], \ 'html': ['tidy'], \ 'jade': ['jade_lint'], @@ -188,24 +189,39 @@ endfunction " }}}2 " not checked for availability (that is, the corresponding IsAvailable() are " not run). function! g:SyntasticRegistry.getCheckers(ftalias, hints_list) abort " {{{2 - let ft = s:_normalise_filetype(a:ftalias) - call self._loadCheckersFor(ft, 0) - - let checkers_map = self._checkerMap[ft] - if empty(checkers_map) - return [] - endif - - call self._checkDeprecation(ft) + let ftlist = self.resolveFiletypes(a:ftalias) let names = - \ !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:_DEFAULT_CHECKERS, ft, 0) + \ !empty(a:hints_list) ? a:hints_list : + \ exists('b:syntastic_checkers') ? b:syntastic_checkers : [] - return type(names) == type([]) ? - \ self._filterCheckersByName(checkers_map, names) : [checkers_map[keys(checkers_map)[0]]] + let cnames = [] + if !empty(names) + for name in names + if name !~# '/' + for ft in ftlist + call add(cnames, ft . '/' . name) + endfor + else + call add(cnames, name) + endif + endfor + else + for ft in ftlist + call self._sanityCheck(ft) + let defs = + \ exists('g:syntastic_' . ft . '_checkers') ? g:syntastic_{ft}_checkers : + \ get(s:_DEFAULT_CHECKERS, ft, []) + call extend(cnames, map(copy(defs), 'stridx(v:val, "/") < 0 ? ft . "/" . v:val : v:val' )) + endfor + endif + let cnames = syntastic#util#unique(cnames) + + for ft in syntastic#util#unique(map( copy(cnames), 'v:val[: stridx(v:val, "/")-1]' )) + call self._loadCheckersFor(ft, 0) + endfor + + return self._filterCheckersByName(cnames) endfunction " }}}2 " Same as getCheckers(), but keep only the available checkers. This runs the @@ -242,8 +258,12 @@ function! g:SyntasticRegistry.getNamesOfAvailableCheckers(ftalias) abort " {{{2 return keys(filter( copy(self._checkerMap[ft]), 'v:val.isAvailable()' )) endfunction " }}}2 +function! g:SyntasticRegistry.resolveFiletypes(ftalias) abort " {{{2 + return map(split( get(g:syntastic_filetype_map, a:ftalias, a:ftalias), '\m\.' ), 's:_normalise_filetype(v:val)') +endfunction " }}}2 + function! g:SyntasticRegistry.echoInfoFor(ftalias_list) abort " {{{2 - let ft_list = syntastic#util#unique(map( copy(a:ftalias_list), 's:_normalise_filetype(v:val)' )) + let ft_list = syntastic#util#unique(self.resolveFiletypes(empty(a:ftalias_list) ? &filetype : a:ftalias_list[0])) if len(ft_list) != 1 let available = [] let active = [] @@ -257,8 +277,8 @@ function! g:SyntasticRegistry.echoInfoFor(ftalias_list) abort " {{{2 else let ft = ft_list[0] let available = self.getNamesOfAvailableCheckers(ft) - let active = map(self.getCheckersAvailable(ft, []), 'v:val.getName()') - let disabled = map(self.getCheckersDisabled(ft, []), 'v:val.getName()') + let active = map(self.getCheckersAvailable(ft, []), 'ft ==# v:val.getFiletype() ? v:val.getName() : v:val.getCName()') + let disabled = map(self.getCheckersDisabled(ft, []), 'ft ==# v:val.getFiletype() ? v:val.getName() : v:val.getCName()') endif let cnt = len(available) @@ -274,7 +294,7 @@ function! g:SyntasticRegistry.echoInfoFor(ftalias_list) abort " {{{2 let cnt = len(disabled) let plural = cnt != 1 ? 's' : '' if len(disabled) - let cklist = join(sort(disabled)) + let cklist = join(sort(disabled, 's:_compare_checker_names')) echomsg 'Checker' . plural . ' disabled for security reasons: ' . cklist endif @@ -321,8 +341,20 @@ function! g:SyntasticRegistry._registerChecker(checker) abort " {{{2 let self._checkerMap[ft][name] = a:checker endfunction " }}}2 -function! g:SyntasticRegistry._filterCheckersByName(checkers_map, list) abort " {{{2 - return filter( map(copy(a:list), 'get(a:checkers_map, v:val, {})'), '!empty(v:val)' ) +function! g:SyntasticRegistry._findChecker(cname) abort " {{{2 + let sep_idx = stridx(a:cname, '/') + if sep_idx > 0 + let ft = a:cname[: sep_idx-1] + let name = a:cname[sep_idx+1 :] + else + let ft = &filetype + let name = a:cname + endif + return get(self._checkerMap[ft], name, {}) +endfunction "}}}2 + +function! g:SyntasticRegistry._filterCheckersByName(cnames) abort " {{{2 + return filter( map(copy(a:cnames), 'self._findChecker(v:val)'), '!empty(v:val)' ) endfunction " }}}2 function! g:SyntasticRegistry._loadCheckersFor(filetype, force) abort " {{{2 @@ -338,7 +370,14 @@ function! g:SyntasticRegistry._loadCheckersFor(filetype, force) abort " {{{2 endfunction " }}}2 " Check for obsolete variable g:syntastic__checker -function! g:SyntasticRegistry._checkDeprecation(filetype) abort " {{{2 +function! g:SyntasticRegistry._sanityCheck(filetype) abort " {{{2 + if exists('g:syntastic_' . a:filetype . '_checkers') && + \ type(g:syntastic_{a:filetype}_checkers) != type([]) + + unlet! g:syntastic_{a:filetype}_checkers + call syntastic#log#error('variable g:syntastic_' . a:filetype . '_checkers has to be a list of strings') + endif + if exists('g:syntastic_' . a:filetype . '_checker') && \ !exists('g:syntastic_' . a:filetype . '_checkers') && \ type(g:syntastic_{a:filetype}_checker) == type('') @@ -375,6 +414,26 @@ function! s:_disabled_by_ycm(filetype) abort " {{{2 return index(s:_YCM_TYPES, a:filetype) >= 0 endfunction " }}}2 +function! s:_compare_checker_names(a, b) abort " {{{2 + if a:a ==# a:b + return 0 + endif + + if stridx(a:a, '/') < 0 + if stridx(a:b, '/') < 0 + return a:a < a:b ? -1 : 1 + else + return -1 + endif + else + if stridx(a:b, '/') < 0 + return 1 + else + return a:a < a:b ? -1 : 1 + endif + endif +endfunction " }}}2 + " }}}1 " vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/asciidoc/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/asciidoc/proselint.vim new file mode 100644 index 00000000..7bc719fc --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/asciidoc/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_asciidoc_proselint_checker') + finish +endif +let g:loaded_syntastic_asciidoc_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'asciidoc', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim b/sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim deleted file mode 100644 index 928e5b30..00000000 --- a/sources_non_forked/syntastic/syntax_checkers/haskell/ghc-mod.vim +++ /dev/null @@ -1,94 +0,0 @@ -"============================================================================ -"File: ghc-mod.vim -"Description: Syntax checking plugin for syntastic.vim -"Maintainer: Anthony Carapetis -"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_haskell_ghc_mod_checker') - finish -endif -let g:loaded_syntastic_haskell_ghc_mod_checker = 1 - -let s:ghc_mod_new = -1 - -let s:save_cpo = &cpo -set cpo&vim - -function! SyntaxCheckers_haskell_ghc_mod_IsAvailable() dict " {{{1 - if !executable(self.getExec()) - return 0 - endif - - " ghc-mod 5.0.0 and later needs the "version" command to print the - " version. But the "version" command appeared in 4.1.0. Thus, we need to - " know the version in order to know how to find out the version. :) - - " Try "ghc-mod version". - let version_output = split(syntastic#util#system(self.getExecEscaped() . ' version'), '\n', 1) - let ver = filter(copy(version_output), 'v:val =~# ''\m\sversion''') - if !len(ver) - " That didn't work. Try "ghc-mod" alone. - let version_output = split(syntastic#util#system(self.getExecEscaped()), '\n', 1) - let ver = filter(copy(version_output), 'v:val =~# ''\m\sversion''') - endif - let parsed_ver = len(ver) ? syntastic#util#parseVersion(ver[0]) : [] - - if len(parsed_ver) - " Encouraged by the great success in finding out the version, now we - " need either a Vim that can handle NULs in system() output, or a - " ghc-mod that has the "--boundary" option. - call self.setVersion(parsed_ver) - let s:ghc_mod_new = syntastic#util#versionIsAtLeast(parsed_ver, [2, 1, 2]) - else - call syntastic#log#ndebug(g:_SYNTASTIC_DEBUG_LOCLIST, 'checker output:', version_output) - call syntastic#log#error("checker haskell/ghc_mod: can't parse version string (abnormal termination?)") - let s:ghc_mod_new = -1 - endif - - " ghc-mod 5.4.0 wants to run in the root directory of the project; - " syntastic can't cope with the resulting complications - " - " References: - " https://hackage.haskell.org/package/ghc-mod-5.4.0.0/changelog - let s:ghc_mod_bailout = syntastic#util#versionIsAtLeast(parsed_ver, [5, 4]) - - return (s:ghc_mod_new >= 0) && (v:version >= 704 || s:ghc_mod_new) && !s:ghc_mod_bailout -endfunction " }}}1 - -function! SyntaxCheckers_haskell_ghc_mod_GetLocList() dict " {{{1 - let makeprg = self.makeprgBuild({ - \ 'exe': self.getExecEscaped() . ' check' . (s:ghc_mod_new ? ' --boundary=""' : '') }) - - let errorformat = - \ '%-G%\s%#,' . - \ '%f:%l:%c:%trror: %m,' . - \ '%f:%l:%c:%tarning: %m,'. - \ '%f:%l:%c: %trror: %m,' . - \ '%f:%l:%c: %tarning: %m,' . - \ '%f:%l:%c:%m,' . - \ '%E%f:%l:%c:,' . - \ '%Z%m' - - return SyntasticMake({ - \ 'makeprg': makeprg, - \ 'errorformat': errorformat, - \ 'preprocess': 'iconv', - \ 'postprocess': ['compressWhitespace'], - \ 'returns': [0] }) -endfunction " }}}1 - -call g:SyntasticRegistry.CreateAndRegisterChecker({ - \ 'filetype': 'haskell', - \ 'name': 'ghc_mod', - \ 'exec': 'ghc-mod' }) - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/help/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/help/proselint.vim new file mode 100644 index 00000000..53ea3854 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/help/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_help_proselint_checker') + finish +endif +let g:loaded_syntastic_help_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'help', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/html/htmlhint.vim b/sources_non_forked/syntastic/syntax_checkers/html/htmlhint.vim new file mode 100644 index 00000000..3518b7ee --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/html/htmlhint.vim @@ -0,0 +1,46 @@ +"============================================================================ +"File: html.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_html_htmlhint_checker') + finish +endif +let g:loaded_syntastic_html_htmlhint_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_html_htmlhint_IsAvailable() dict + if !executable(self.getExec()) + return 0 + endif + return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 9, 13]) +endfunction + +function! SyntaxCheckers_html_htmlhint_GetLocList() dict + let makeprg = self.makeprgBuild({ 'args_before': '--format unix' }) + + let errorformat = '%f:%l:%c: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'returns': [0, 1] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'html', + \ 'name': 'htmlhint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/html/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/html/proselint.vim new file mode 100644 index 00000000..fc364df6 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/html/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_html_proselint_checker') + finish +endif +let g:loaded_syntastic_html_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'html', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/markdown/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/markdown/proselint.vim new file mode 100644 index 00000000..3f275749 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/markdown/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_markdown_proselint_checker') + finish +endif +let g:loaded_syntastic_markdown_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'markdown', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim b/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim index e309c1f3..7ea86d1a 100644 --- a/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim +++ b/sources_non_forked/syntastic/syntax_checkers/nasm/nasm.vim @@ -20,7 +20,7 @@ set cpo&vim function! SyntaxCheckers_nasm_nasm_GetLocList() dict let makeprg = self.makeprgBuild({ - \ 'args_after': '-X gnu -f elf' . + \ 'args_after': '-X gnu' . \ ' -I ' . syntastic#util#shescape(expand('%:p:h', 1) . syntastic#util#Slash()) . \ ' ' . syntastic#c#NullOutput() }) diff --git a/sources_non_forked/syntastic/syntax_checkers/nroff/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/nroff/proselint.vim new file mode 100644 index 00000000..d969490e --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/nroff/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_nroff_proselint_checker') + finish +endif +let g:loaded_syntastic_nroff_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'nroff', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/pod/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/pod/proselint.vim new file mode 100644 index 00000000..bcb67b2f --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/pod/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_pod_proselint_checker') + finish +endif +let g:loaded_syntastic_pod_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'pod', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/rst/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/rst/proselint.vim new file mode 100644 index 00000000..07e8b648 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/rst/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_rst_proselint_checker') + finish +endif +let g:loaded_syntastic_rst_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'rst', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/stylus/stylint.vim b/sources_non_forked/syntastic/syntax_checkers/stylus/stylint.vim index f489910e..b32b745e 100644 --- a/sources_non_forked/syntastic/syntax_checkers/stylus/stylint.vim +++ b/sources_non_forked/syntastic/syntax_checkers/stylus/stylint.vim @@ -19,13 +19,25 @@ let s:save_cpo = &cpo set cpo&vim function! SyntaxCheckers_stylus_stylint_GetLocList() dict + if !exists('s:stylint_new') + let s:stylint_new = syntastic#util#versionIsAtLeast(self.getVersion(), [1, 5, 7]) + endif + let makeprg = self.makeprgBuild({}) - let errorformat = - \ '%WWarning: %m,' . - \ '%EError: %m,' . - \ '%CFile: %f,' . - \ '%CLine: %l:%.%#' + if s:stylint_new + let errorformat = + \ '%P%f,' . + \ '%-Q,' . + \ '%\m%l:%c%\s%\+%t%\%%(rror%\|arning%\)%\s%\+%m%\s%\+%\S%\+%\s%#,' . + \ '%\m%l%\s%\+%t%\%%(rror%\|arning%\)%\s%\+%m%\s%\+%\S%\+%\s%#' + else + let errorformat = + \ '%WWarning: %m,' . + \ '%EError: %m,' . + \ '%CFile: %f,' . + \ '%CLine: %l:%.%#' + endif return SyntasticMake({ \ 'makeprg': makeprg, diff --git a/sources_non_forked/syntastic/syntax_checkers/tex/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/tex/proselint.vim new file mode 100644 index 00000000..657503a3 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/tex/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_tex_proselint_checker') + finish +endif +let g:loaded_syntastic_tex_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'tex', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/texinfo/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/texinfo/proselint.vim new file mode 100644 index 00000000..1afac027 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/texinfo/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_texinfo_proselint_checker') + finish +endif +let g:loaded_syntastic_texinfo_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'texinfo', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/text/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/text/proselint.vim new file mode 100644 index 00000000..9aa95132 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/text/proselint.vim @@ -0,0 +1,45 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_text_proselint_checker') + finish +endif +let g:loaded_syntastic_text_proselint_checker = 1 + +if !exists('g:syntastic_text_proselint_sort') + let g:syntastic_text_proselint_sort = 1 +endif + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_text_proselint_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = '%f:%l:%c: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': { 'type': 'W', 'subtype': 'Style' }, + \ 'preprocess': 'iconv', + \ 'returns': [0, 1] }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'text', + \ 'name': 'proselint'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim b/sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim index 0e03ed0b..19cab49e 100644 --- a/sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim +++ b/sources_non_forked/syntastic/syntax_checkers/vim/vimlint.vim @@ -99,8 +99,7 @@ endfunction " }}}2 call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'vim', - \ 'name': 'vimlint', - \ 'exec': '' }) + \ 'name': 'vimlint' }) let &cpo = s:save_cpo unlet s:save_cpo diff --git a/sources_non_forked/syntastic/syntax_checkers/xhtml/proselint.vim b/sources_non_forked/syntastic/syntax_checkers/xhtml/proselint.vim new file mode 100644 index 00000000..aea24a81 --- /dev/null +++ b/sources_non_forked/syntastic/syntax_checkers/xhtml/proselint.vim @@ -0,0 +1,23 @@ +"============================================================================ +"File: proselint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"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_xhtml_proselint_checker') + finish +endif +let g:loaded_syntastic_xhtml_proselint_checker = 1 + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'xhtml', + \ 'name': 'proselint', + \ 'redirect': 'text/proselint'}) + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/sources_non_forked/vim-flake8/README.mdown b/sources_non_forked/vim-flake8/README.mdown index 940eadf7..00d49515 100644 --- a/sources_non_forked/vim-flake8/README.mdown +++ b/sources_non_forked/vim-flake8/README.mdown @@ -108,6 +108,20 @@ This plugin goes well together with the following plugin: and ``) +Max line lengths +---------------- + +One particular customization a lot of people like to make is relaxing the +maximum line length default. This is a config setting that should be set in +flake8 itself. (vim-flake8 "just" invokes it and deals with showing the output +in Vim's quickfix window.) + +To do so, put the following into your `~/.config/flake8` file: + + [flake8] + max-line-length = 120 + + History ------- 1.6: Deprecated configuring flake8 options through Vim settings. Instead, diff --git a/sources_non_forked/vim-fugitive/plugin/fugitive.vim b/sources_non_forked/vim-fugitive/plugin/fugitive.vim index 345ea349..576dda19 100644 --- a/sources_non_forked/vim-fugitive/plugin/fugitive.vim +++ b/sources_non_forked/vim-fugitive/plugin/fugitive.vim @@ -468,8 +468,8 @@ endfun function! s:repo_aliases() dict abort if !has_key(self,'_aliases') let self._aliases = {} - for line in split(self.git_chomp('config','--get-regexp','^alias[.]'),"\n") - let self._aliases[matchstr(line,'\.\zs\S\+')] = matchstr(line,' \zs.*') + for line in split(self.git_chomp('config','-z','--get-regexp','^alias[.]'),"\1") + let self._aliases[matchstr(line, '\.\zs.\{-}\ze\n')] = matchstr(line, '\n\zs.*') endfor endif return self._aliases @@ -1776,13 +1776,17 @@ function! s:Diff(vert,keepfocus,...) abort let nr = bufnr('') execute 'leftabove '.vert.'split `=fugitive#buffer().repo().translate(s:buffer().expand('':2''))`' execute 'nnoremap dp :diffput '.nr.'diffupdate' + let nr2 = bufnr('') call s:diffthis() wincmd p execute 'rightbelow '.vert.'split `=fugitive#buffer().repo().translate(s:buffer().expand('':3''))`' execute 'nnoremap dp :diffput '.nr.'diffupdate' + let nr3 = bufnr('') call s:diffthis() wincmd p call s:diffthis() + execute 'nnoremap d2o :diffget '.nr2.'diffupdate' + execute 'nnoremap d3o :diffget '.nr3.'diffupdate' return post elseif len(args) let arg = join(args, ' ') @@ -2317,7 +2321,7 @@ function! s:Browse(bang,line1,count,...) abort if empty(url) && raw ==# '.' call s:throw("Instaweb failed to start") elseif empty(url) - call s:throw('"'.remote."' is not a supported remote") + call s:throw("'".remote."' is not a supported remote") endif let url = s:gsub(url, '[ <>]', '\="%".printf("%02X",char2nr(submatch(0)))') diff --git a/sources_non_forked/vim-go/.github/ISSUE_TEMPLATE.md b/sources_non_forked/vim-go/.github/ISSUE_TEMPLATE.md index 0adaff3c..467b1287 100644 --- a/sources_non_forked/vim-go/.github/ISSUE_TEMPLATE.md +++ b/sources_non_forked/vim-go/.github/ISSUE_TEMPLATE.md @@ -1,16 +1,14 @@ -### Actual behavior +### Behavior -Write here what's happening ... - -### Expected behavior - -Write here what you're expecting ... +Write here what's happening and what you're expecting instead of... ### Steps to reproduce: -Please create a reproducible case of your problem. Re produce it -with a minimal `vimrc` with all plugins disabled and only `vim-go` -enabled: +Please create a reproducible case of your problem. If this step is +not provided, the issue will be **closed** + +Re produce it with a minimal `vimrc` with all plugins disabled and +only `vim-go` enabled: 1. 2. @@ -22,7 +20,7 @@ Add here your current configuration and additional information that might be useful, such as: * `vimrc` you used to reproduce -* vim version: -* vim-go version -* go version +* vim version: +* vim-go version: +* go version: diff --git a/sources_non_forked/vim-go/CHANGELOG.md b/sources_non_forked/vim-go/CHANGELOG.md index a6923af6..0a6be1cf 100644 --- a/sources_non_forked/vim-go/CHANGELOG.md +++ b/sources_non_forked/vim-go/CHANGELOG.md @@ -1,11 +1,143 @@ -## Unplanned +## 1.11 - Unplanned + +FEATURES: + +* Add new `g:go_updatetime` setting to change the default updatetime (which was hardcoded previously) [gh-1055] +* Add new `g:go_template_use_pkg` setting to enable to use cwd as package name instead of basic template file [gh-1124] + +IMPROVEMENTS: + +* Add `statusline` support for `:GoMetaLinter` [gh-1120] +* Quickfix and Location lists contain now a descriptive title (requires at least Vim `7.4.2200`)[gh-1004] + +BUG FIXES: + +* Always use full path to detect packages to be shown in statusline [gh-1121] +* Use `echom` to persist errors in case of multiple echos [gh-1122] +* Fix a race condition where a quickfix window was not closed if a job has succeeded [gh-1123] +* Do not expand coverage arguments for non job execution of `:GoCoverage` [gh-1127] +* `:GoCoverage` doesn't mess up custom syntax anymore [gh-1128] +* Disable autoformat for `asm` files as they might be non Go ASM format [gh-1141] +* Fix indentation broken when using a action with a minus sign like `{{-` [gh-1143] +* Fix breaking Neovim change of passing less arguments to callbacks [gh-1145] +* Fix `guru` commands if custom build tags were set [gh-1136] +* Fix referencing a non defined variable for async commands when bang (!) was used +* Fix `:GoDef` failing for a modified buffer if `hidden` was not set [gh-1132] +* Fix `:GoDefStack` to allow popping from jump list when buffer is modified [gh-1133] + + +## 1.10 (November 24, 2016) + +FEATURES: + +* **Vim 8.0 support!** This is the initial version to add Vim 8.0 based support to + all basic commands (check out below for more information). With time we'll + going to extend it to other commands. All the features are only enabled if + you have at least Vim 8.0.0087. Backwards compatible with Vim 7.4.x. + If you see any problems, please open an issue. * We have now a [logo for vim-go](https://github.com/fatih/vim-go/blob/master/assets/vim-go.png)! Thanks to @egonelbre for his work on this. +* `:GoBuild`, `:GoTest`, `:GoTestCompile`, `:GoInstall` commands are now fully + async. Async means it doesn't block your UI anymore. If the command finished + it echoes the status. For a better experience use the statusline information + (more info below) + +* `:GoCoverage` and `:GoCoverageBrowser` commands are fully async. +* `:GoDef` is fully async if `guru` is used as command. +* `:GoRename` is fully async . + +* `:GoMetaLinter` is fully asnyc. Also works with the current autosave linting + feature. As a reminder, to enable auto linting on save either call + `:GoMetaLinterAutoSaveToggle` (temporary) or add `let + g:go_metalinter_autosave = 1` (persistent) to your virmc). + +* All `guru` commands run asynchronously if Vim 8.0 is being used. Current + Commands: + * GoImplements + * GoWhicherrs + * GoCallees + * GoDescribe + * GoCallers + * GoCallstack + * GoFreevars + * GoChannelPeers + * GoReferrers + +* `:GoSameIds` also runs asynchronously. This makes it useful especially for + auto sameids mode. In this mode it constantly evaluates the identifier under the + cursor whenever it's in hold position and then calls :GoSameIds. As a + reminder, to enable auto info either call `:GoSameIdsAutoToggle`(temporary) + or add `let g:go_auto_sameids = 1` (persistent) to your vimrc. + +* `:GoInfo` is now non blocking and works in async mode if `guru` is used in + `g:go_info_mode`. This makes it useful especially for autoinfo mode. In this + mode it constantly evaluates the identifier under the cursor whenever it's in + hold position and then calls :GoInfo. As a reminder, to enable auto info + either call `:GoAutoTypeInfoToggle`(temporary) or add `let + g:go_auto_type_info = 1` (persistent) to your vimrc. To use `guru` instead of + `gocode` add following to your vimrc: `let g:go_info_mode = 'guru'` + + The `guru` is more accurate and reliabed due the usage of `guru` describe. It + doesn't rely on `pkg/` folder like `gocode` does. However it's slower than + `gocode` as there is no caching mechanism in `guru` yet. + +* **New**: Statusline function: `go#statusline#Show()` which can be plugged into + the statusline bar. Works only with vim 8.0. It shows all asynchronously + called functions status real time. Checkout it in action: + https://twitter.com/fatih/status/800473735467847680. To enable it add the + following to your `vimrc`. If you use lightline, airline, .. check out their + respective documentation on how to add a custom function: + +```viml +" go command status (requires vim-go) +set statusline+=%#goStatuslineColor# +set statusline+=%{go#statusline#Show()} +set statusline+=%* +``` + +IMPROVEMENTS: + +* **:GoDocBrowser** is now capable to to understand the identifier under the cursor (just like :GoDoc) +* Function calls are now highlighted as well when `g:go_highlight_functions` is enabled [gh-1048] +* Add completion support for un-imported packages. This allows to complete even + if the package is not imported. By default it's disabled, enable by adding + `let g:go_gocode_unimported_packages = 1` [gh-1084] +* Tools that embeds GOROOT into their binaries do not work when people update + their Go version and the GOROOT contains the vesion as part of their path + (i.e: `/usr/local/Cellar/go/1.7.2/libexec`, [more + info](https://blog.filippo.io/stale-goroot-and-gorebuild/)) . This is now + fixed by introducing automatic GOROOT set/unset before each tool invoke. + [gh-954] +* Added new setting `g:go_echo_go_info` to enable/disable printing identifier + information when completion is done [gh-1101] +* Added new `go_echo_command_info` setting is added, which is enabled by + default. It's just a switch for disabling messages of commands, such as + `:GoBuild`, `:GoTest`, etc.. Useful to *disable* if `go#statusline#Show()` is + being used in Statusline, to prevent to see duplicates notifications. +* goSameId highlighting is now linked to `Search`, which is much more clear as + it changes according to the users colorscheme +* Add plug mapping `(go-lint)` for :GoLint [gh-1089] + BUG FIXES: * Change back nil and iota highlighting color to the old type [gh-1049] * Fix passing arguments to `:GoBuild` while using NeoVim [gh-1062] +* Do not open a split if `:GoDef` is used on a modified file [gh-1083] +* Highlight nested structs correctly [gh-1075] +* Highlight builtin functions correctly if `g:go_highlight_functions` is enabled [gh-1070] +* Fix `:GoSameIds` highlighting if a new buffer is opened in the same window [gh-1067] +* Internal: add `abort` to all vim function to return in case of errors [gh-1100] +* Fix `:GoCoverage` to be executed if working dir is not inside the test dir [gh-1033] + +BACKWARDS INCOMPATIBILITIES: + +* remove vim-dispatch and vimproc.vim support. vim 8.0 has now the necessary + API to invoke async jobs and timers. Going forward we should use those. Also + this will remove the burden to maintain compatibility with those plugins. + +* `go#jobcontrol#Statusline()` is removed in favor of the new, global and + extensible `go#statusline#Show()` ## 1.9 (September 13, 2016) diff --git a/sources_non_forked/vim-go/LICENSE b/sources_non_forked/vim-go/LICENSE index e9cc0dcd..fd538bde 100644 --- a/sources_non_forked/vim-go/LICENSE +++ b/sources_non_forked/vim-go/LICENSE @@ -56,3 +56,5 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The Go gopher was designed by Renee French. http://reneefrench.blogspot.com/ The design is licensed under the Creative Commons 3.0 Attributions license. Read this article for more details: https://blog.golang.org/gopher diff --git a/sources_non_forked/vim-go/README.md b/sources_non_forked/vim-go/README.md index 1d886e90..504149b2 100644 --- a/sources_non_forked/vim-go/README.md +++ b/sources_non_forked/vim-go/README.md @@ -46,10 +46,8 @@ disabled/enabled easily. * Custom vim text objects such as `a function` or `inner function` list. * Jump to function or type declarations with `:GoDecls` or `:GoDeclsDir` -* A async launcher for the go command is implemented for Neovim, fully async - building and testing (beta). -* Integrated with the Neovim terminal, launch `:GoRun` and other go commands - in their own new terminal. (beta) +* Vim 8.0 support. Async execution for most commands, various underlying improvements. +* NeoVim support (beta). Async execution for some commands. * Alternate between implementation and test code with `:GoAlternate` Checkout the official [tutorial](https://github.com/fatih/vim-go-tutorial) @@ -237,9 +235,10 @@ let g:go_get_update = 0 ### Using with Neovim (beta) Note: Neovim currently is not a first class citizen for vim-go. You are free -to open bugs but I'm not going to look at them. Even though I'm using Neovim -myself, Neovim itself is still alpha. So vim-go might not work well as good as -in Vim. I'm happy to accept pull requests or very detailed bug reports. +to open bug, however I'm not using Neovim so it's hard for me to test it. +vim-go might not work well as good as in Vim. I'm happy to accept pull requests +or very detailed bug reports. If you're interested to improve the state of +Neovim in vim-go you're always welcome! Run `:GoRun` in a new tab, horizontal split or vertical split terminal diff --git a/sources_non_forked/vim-go/autoload/ctrlp/decls.vim b/sources_non_forked/vim-go/autoload/ctrlp/decls.vim index 7af2cda7..e1465adb 100644 --- a/sources_non_forked/vim-go/autoload/ctrlp/decls.vim +++ b/sources_non_forked/vim-go/autoload/ctrlp/decls.vim @@ -14,12 +14,12 @@ else let g:ctrlp_ext_vars = [s:go_decls_var] endif -function! ctrlp#decls#init() +function! ctrlp#decls#init() abort cal s:enable_syntax() return s:decls endfunction -function! ctrlp#decls#exit() +function! ctrlp#decls#exit() abort unlet! s:decls s:current_dir s:target endfunction @@ -28,7 +28,7 @@ endfunction " a:mode the mode that has been chosen by pressing or " the values are 'e', 'v', 't' and 'h', respectively " a:str the selected string -function! ctrlp#decls#accept(mode, str) +function! ctrlp#decls#accept(mode, str) abort let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' let dir = getcwd() try @@ -56,7 +56,7 @@ function! ctrlp#decls#accept(mode, str) endtry endfunction -function! ctrlp#decls#enter() +function! ctrlp#decls#enter() abort let s:current_dir = fnameescape(expand('%:p:h')) let s:decls = [] @@ -130,7 +130,7 @@ function! ctrlp#decls#enter() endfor endfunc -function! s:enable_syntax() +function! s:enable_syntax() abort if !(has('syntax') && exists('g:syntax_on')) return endif @@ -148,7 +148,7 @@ endfunction let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars) -function! ctrlp#decls#cmd(mode, ...) +function! ctrlp#decls#cmd(mode, ...) abort let s:mode = a:mode if a:0 && !empty(a:1) let s:target = a:1 diff --git a/sources_non_forked/vim-go/autoload/go/alternate.vim b/sources_non_forked/vim-go/autoload/go/alternate.vim index dc5643dc..f2cb210f 100644 --- a/sources_non_forked/vim-go/autoload/go/alternate.vim +++ b/sources_non_forked/vim-go/autoload/go/alternate.vim @@ -4,7 +4,7 @@ if !exists("g:go_alternate_mode") endif " Test alternates between the implementation of code and the test code. -function! go#alternate#Switch(bang, cmd) +function! go#alternate#Switch(bang, cmd) abort let file = expand('%') if empty(file) call go#util#EchoError("no buffer name") diff --git a/sources_non_forked/vim-go/autoload/go/asmfmt.vim b/sources_non_forked/vim-go/autoload/go/asmfmt.vim index b47651da..07779b57 100644 --- a/sources_non_forked/vim-go/autoload/go/asmfmt.vim +++ b/sources_non_forked/vim-go/autoload/go/asmfmt.vim @@ -11,7 +11,7 @@ " " Options: " -" g:go_asmfmt_autosave [default=1] +" g:go_asmfmt_autosave [default=0] " " Flag to automatically call :Fmt when file is saved. @@ -19,7 +19,7 @@ let s:got_fmt_error = 0 " This is a trimmed-down version of the logic in fmt.vim. -function! go#asmfmt#Format() +function! go#asmfmt#Format() abort " Save state. let l:curw = winsaveview() @@ -55,15 +55,15 @@ function! go#asmfmt#Format() call winrestview(l:curw) endfunction -function! go#asmfmt#ToggleAsmFmtAutoSave() - if get(g:, "go_asmfmt_autosave", 1) - let g:go_asmfmt_autosave = 0 - call go#util#EchoProgress("auto asmfmt disabled") +function! go#asmfmt#ToggleAsmFmtAutoSave() abort + if get(g:, "go_asmfmt_autosave", 0) + let g:go_asmfmt_autosave = 1 + call go#util#EchoProgress("auto asmfmt enabled") return end - let g:go_asmfmt_autosave = 1 - call go#util#EchoProgress("auto asmfmt enabled") + let g:go_asmfmt_autosave = 0 + call go#util#EchoProgress("auto asmfmt disabled") endfunction " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/autoload/go/cmd.vim b/sources_non_forked/vim-go/autoload/go/cmd.vim index 126ac807..e7a5daf7 100644 --- a/sources_non_forked/vim-go/autoload/go/cmd.vim +++ b/sources_non_forked/vim-go/autoload/go/cmd.vim @@ -1,19 +1,14 @@ -if !exists("g:go_dispatch_enabled") - let g:go_dispatch_enabled = 0 -endif - -function! go#cmd#autowrite() +function! go#cmd#autowrite() abort if &autowrite == 1 - silent wall + silent! wall endif endfunction - " Build builds the source code without producting any output binary. We live in " an editor so the best is to build it to catch errors and fix them. By " default it tries to call simply 'go build', but it first tries to get all " dependent files for the current folder and passes it to go build. -function! go#cmd#Build(bang, ...) +function! go#cmd#Build(bang, ...) abort " expand all wildcards(i.e: '%' to the current file name) let goargs = map(copy(a:000), "expand(v:val)") @@ -26,8 +21,18 @@ function! go#cmd#Build(bang, ...) " placeholder with the current folder (indicated with '.') let args = ["build"] + goargs + [".", "errors"] - " if we have nvim, call it asynchronously and return early ;) - if has('nvim') + if go#util#has_job() + if get(g:, 'go_echo_command_info', 1) + call go#util#EchoProgress("building dispatched ...") + endif + + call s:cmd_job({ + \ 'cmd': ['go'] + args, + \ 'bang': a:bang, + \}) + return + elseif has('nvim') + " if we have nvim, call it asynchronously and return early ;) call go#util#EchoProgress("building dispatched ...") call go#jobcontrol#Spawn(a:bang, "build", args) return @@ -45,10 +50,7 @@ function! go#cmd#Build(bang, ...) let dir = getcwd() try execute cd . fnameescape(expand("%:p:h")) - if g:go_dispatch_enabled && exists(':Make') == 2 - call go#util#EchoProgress("building dispatched ...") - silent! exe 'Make' - elseif l:listtype == "locationlist" + if l:listtype == "locationlist" silent! exe 'lmake!' else silent! exe 'make!' @@ -60,11 +62,8 @@ function! go#cmd#Build(bang, ...) let errors = go#list#Get(l:listtype) call go#list#Window(l:listtype, len(errors)) - - if !empty(errors) - if !a:bang - call go#list#JumpToFirst(l:listtype) - endif + if !empty(errors) && !a:bang + call go#list#JumpToFirst(l:listtype) else call go#util#EchoSuccess("[build] SUCCESS") endif @@ -75,7 +74,7 @@ endfunction " Run runs the current file (and their dependencies if any) in a new terminal. -function! go#cmd#RunTerm(bang, mode, files) +function! go#cmd#RunTerm(bang, mode, files) abort if empty(a:files) let cmd = "go run ". go#util#Shelljoin(go#tool#Files()) else @@ -88,12 +87,18 @@ endfunction " This is intented to test small programs and play with them. It's not " suitable for long running apps, because vim is blocking by default and " calling long running apps will block the whole UI. -function! go#cmd#Run(bang, ...) +function! go#cmd#Run(bang, ...) abort if has('nvim') call go#cmd#RunTerm(a:bang, '', a:000) return endif + if go#util#has_job() + " NOTE(arslan): 'term': 'open' case is not implement for +jobs. This means + " executions waiting for stdin will not work. That's why we don't do + " anything. Once this is implemented we're going to make :GoRun async + endif + let old_gopath = $GOPATH let $GOPATH = go#path#Detect() @@ -119,9 +124,7 @@ function! go#cmd#Run(bang, ...) let l:listtype = go#list#Type("quickfix") - if g:go_dispatch_enabled && exists(':Make') == 2 - silent! exe 'Make' - elseif l:listtype == "locationlist" + if l:listtype == "locationlist" exe 'lmake!' else exe 'make!' @@ -130,7 +133,7 @@ function! go#cmd#Run(bang, ...) let items = go#list#Get(l:listtype) let errors = go#tool#FilterValids(items) - call go#list#Populate(l:listtype, errors) + call go#list#Populate(l:listtype, errors, &makeprg) call go#list#Window(l:listtype, len(errors)) if !empty(errors) && !a:bang call go#list#JumpToFirst(l:listtype) @@ -141,9 +144,28 @@ function! go#cmd#Run(bang, ...) endfunction " Install installs the package by simple calling 'go install'. If any argument -" is given(which are passed directly to 'go install') it tries to install those -" packages. Errors are populated in the location window. -function! go#cmd#Install(bang, ...) +" is given(which are passed directly to 'go install') it tries to install +" those packages. Errors are populated in the location window. +function! go#cmd#Install(bang, ...) abort + " use vim's job functionality to call it asynchronously + if go#util#has_job() + " expand all wildcards(i.e: '%' to the current file name) + let goargs = map(copy(a:000), "expand(v:val)") + + " escape all shell arguments before we pass it to make + let goargs = go#util#Shelllist(goargs, 1) + + if get(g:, 'go_echo_command_info', 1) + call go#util#EchoProgress("installing dispatched ...") + endif + + call s:cmd_job({ + \ 'cmd': ['go', 'install'] + goargs, + \ 'bang': a:bang, + \}) + return + endif + let old_gopath = $GOPATH let $GOPATH = go#path#Detect() let default_makeprg = &makeprg @@ -159,10 +181,7 @@ function! go#cmd#Install(bang, ...) let dir = getcwd() try execute cd . fnameescape(expand("%:p:h")) - if g:go_dispatch_enabled && exists(':Make') == 2 - call go#util#EchoProgress("building dispatched ...") - silent! exe 'Make' - elseif l:listtype == "locationlist" + if l:listtype == "locationlist" silent! exe 'lmake!' else silent! exe 'make!' @@ -174,12 +193,10 @@ function! go#cmd#Install(bang, ...) let errors = go#list#Get(l:listtype) call go#list#Window(l:listtype, len(errors)) - if !empty(errors) - if !a:bang - call go#list#JumpToFirst(l:listtype) - endif + if !empty(errors) && !a:bang + call go#list#JumpToFirst(l:listtype) else - redraws! | echon "vim-go: " | echohl Function | echon "installed to ". $GOPATH | echohl None + call go#util#EchoSuccess("installed to ". $GOPATH) endif let $GOPATH = old_gopath @@ -189,7 +206,7 @@ endfunction " Test runs `go test` in the current directory. If compile is true, it'll " compile the tests instead of running them (useful to catch errors in the " test files). Any other argument is appendend to the final `go test` command -function! go#cmd#Test(bang, compile, ...) +function! go#cmd#Test(bang, compile, ...) abort let args = ["test"] " don't run the test, only compile it. Useful to capture and fix errors. @@ -199,9 +216,15 @@ function! go#cmd#Test(bang, compile, ...) endif if a:0 - " expand all wildcards(i.e: '%' to the current file name) - let goargs = map(copy(a:000), "expand(v:val)") - if !has('nvim') + let goargs = a:000 + + " do not expand for coverage mode as we're passing the arg ourself + if a:1 != '-coverprofile' + " expand all wildcards(i.e: '%' to the current file name) + let goargs = map(copy(a:000), "expand(v:val)") + endif + + if !(has('nvim') || go#util#has_job()) let goargs = go#util#Shelllist(goargs, 1) endif @@ -212,13 +235,29 @@ function! go#cmd#Test(bang, compile, ...) call add(args, printf("-timeout=%s", timeout)) endif - if a:compile - echon "vim-go: " | echohl Identifier | echon "compiling tests ..." | echohl None - else - echon "vim-go: " | echohl Identifier | echon "testing ..." | echohl None + if get(g:, 'go_echo_command_info', 1) + if a:compile + echon "vim-go: " | echohl Identifier | echon "compiling tests ..." | echohl None + else + echon "vim-go: " | echohl Identifier | echon "testing ..." | echohl None + endif endif - if has('nvim') + if go#util#has_job() + " use vim's job functionality to call it asynchronously + let job_args = { + \ 'cmd': ['go'] + args, + \ 'bang': a:bang, + \ } + + if a:compile + let job_args['custom_cb'] = function('s:test_compile', [compile_file]) + endif + + call s:cmd_job(job_args) + return + elseif has('nvim') + " use nvims's job functionality if get(g:, 'go_term_enabled', 0) let id = go#term#new(a:bang, ["go"] + args) else @@ -252,7 +291,7 @@ function! go#cmd#Test(bang, compile, ...) let errors = go#tool#ParseErrors(split(out, '\n')) let errors = go#tool#FilterValids(errors) - call go#list#Populate(l:listtype, errors) + call go#list#Populate(l:listtype, errors, command) call go#list#Window(l:listtype, len(errors)) if !empty(errors) && !a:bang call go#list#JumpToFirst(l:listtype) @@ -276,7 +315,7 @@ endfunction " Testfunc runs a single test that surrounds the current cursor position. " Arguments are passed to the `go test` command. -function! go#cmd#TestFunc(bang, ...) +function! go#cmd#TestFunc(bang, ...) abort " search flags legend (used only) " 'b' search backward instead of forward " 'c' accept a match at the cursor position @@ -304,7 +343,7 @@ function! go#cmd#TestFunc(bang, ...) endfunction " Generate runs 'go generate' in similar fashion to go#cmd#Build() -function! go#cmd#Generate(bang, ...) +function! go#cmd#Generate(bang, ...) abort let default_makeprg = &makeprg let old_gopath = $GOPATH @@ -322,9 +361,7 @@ function! go#cmd#Generate(bang, ...) let l:listtype = go#list#Type("quickfix") echon "vim-go: " | echohl Identifier | echon "generating ..."| echohl None - if g:go_dispatch_enabled && exists(':Make') == 2 - silent! exe 'Make' - elseif l:listtype == "locationlist" + if l:listtype == "locationlist" silent! exe 'lmake!' else silent! exe 'make!' @@ -346,12 +383,79 @@ function! go#cmd#Generate(bang, ...) endfunction +" --------------------- +" | Vim job callbacks | +" --------------------- + +function s:cmd_job(args) abort + let status_dir = expand('%:p:h') + let started_at = reltime() + + call go#statusline#Update(status_dir, { + \ 'desc': "current status", + \ 'type': a:args.cmd[1], + \ 'state': "started", + \}) + + " autowrite is not enabled for jobs + call go#cmd#autowrite() + + function! s:error_info_cb(job, exit_status, data) closure abort + let status = { + \ 'desc': 'last status', + \ 'type': a:args.cmd[1], + \ 'state': "success", + \ } + + if a:exit_status + let status.state = "failed" + endif + + let elapsed_time = reltimestr(reltime(started_at)) + " strip whitespace + let elapsed_time = substitute(elapsed_time, '^\s*\(.\{-}\)\s*$', '\1', '') + let status.state .= printf(" (%ss)", elapsed_time) + + call go#statusline#Update(status_dir, status) + endfunction + + let a:args.error_info_cb = function('s:error_info_cb') + let callbacks = go#job#Spawn(a:args) + + let start_options = { + \ 'callback': callbacks.callback, + \ 'close_cb': callbacks.close_cb, + \ } + + " modify GOPATH if needed + let old_gopath = $GOPATH + let $GOPATH = go#path#Detect() + + " pre start + let dir = getcwd() + let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' + let jobdir = fnameescape(expand("%:p:h")) + execute cd . jobdir + + call job_start(a:args.cmd, start_options) + + " post start + execute cd . fnameescape(dir) + let $GOPATH = old_gopath +endfunction + + +" test_compile is called when a GoTestCompile call is finished +function! s:test_compile(test_file, job, exit_status, data) abort + call delete(a:test_file) +endfunction + " ----------------------- " | Neovim job handlers | " ----------------------- let s:test_compile_handlers = {} -function! s:test_compile_handler(job, exit_status, data) +function! s:test_compile_handler(job, exit_status, data) abort if !has_key(s:test_compile_handlers, a:job.id) return endif diff --git a/sources_non_forked/vim-go/autoload/go/complete.vim b/sources_non_forked/vim-go/autoload/go/complete.vim index 17834536..2663afbd 100644 --- a/sources_non_forked/vim-go/autoload/go/complete.vim +++ b/sources_non_forked/vim-go/autoload/go/complete.vim @@ -1,6 +1,6 @@ let s:sock_type = (has('win32') || has('win64')) ? 'tcp' : 'unix' -function! s:gocodeCurrentBuffer() +function! s:gocodeCurrentBuffer() abort let buf = getline(1, '$') if &encoding != 'utf-8' let buf = map(buf, 'iconv(v:val, &encoding, "utf-8")') @@ -16,7 +16,7 @@ function! s:gocodeCurrentBuffer() return file endfunction -function! s:gocodeCommand(cmd, preargs, args) +function! s:gocodeCommand(cmd, preargs, args) abort for i in range(0, len(a:args) - 1) let a:args[i] = go#util#Shellescape(a:args[i]) endfor @@ -32,7 +32,9 @@ function! s:gocodeCommand(cmd, preargs, args) " we might hit cache problems, as gocode doesn't handle well different " GOPATHS: https://github.com/nsf/gocode/issues/239 let old_gopath = $GOPATH + let old_goroot = $GOROOT let $GOPATH = go#path#Detect() + let $GOROOT = go#util#env("goroot") let socket_type = get(g:, 'go_gocode_socket_type', s:sock_type) let cmd = printf('%s -sock %s %s %s %s', @@ -45,6 +47,8 @@ function! s:gocodeCommand(cmd, preargs, args) let result = go#util#System(cmd) let $GOPATH = old_gopath + let $GOROOT = old_goroot + if go#util#ShellError() != 0 return "[\"0\", []]" else @@ -55,12 +59,12 @@ function! s:gocodeCommand(cmd, preargs, args) endif endfunction -function! s:gocodeCurrentBufferOpt(filename) +function! s:gocodeCurrentBufferOpt(filename) abort return '-in=' . a:filename endfunction let s:optionsEnabled = 0 -function! s:gocodeEnableOptions() +function! s:gocodeEnableOptions() abort if s:optionsEnabled return endif @@ -74,13 +78,14 @@ function! s:gocodeEnableOptions() call go#util#System(printf('%s set propose-builtins %s', go#util#Shellescape(bin_path), s:toBool(get(g:, 'go_gocode_propose_builtins', 1)))) call go#util#System(printf('%s set autobuild %s', go#util#Shellescape(bin_path), s:toBool(get(g:, 'go_gocode_autobuild', 1)))) + call go#util#System(printf('%s set unimported-packages %s', go#util#Shellescape(bin_path), s:toBool(get(g:, 'go_gocode_unimported_packages', 0)))) endfunction -function! s:toBool(val) +function! s:toBool(val) abort if a:val | return 'true ' | else | return 'false' | endif endfunction -function! s:gocodeAutocomplete() +function! s:gocodeAutocomplete() abort call s:gocodeEnableOptions() let filename = s:gocodeCurrentBuffer() @@ -91,7 +96,7 @@ function! s:gocodeAutocomplete() return result endfunction -function! go#complete#GetInfo() +function! go#complete#GetInfo() abort let offset = go#util#OffsetCursor()+1 let filename = s:gocodeCurrentBuffer() let result = s:gocodeCommand('autocomplete', @@ -132,7 +137,7 @@ function! go#complete#GetInfo() return "" endfunction -function! go#complete#Info(auto) +function! go#complete#Info(auto) abort " auto is true if we were called by g:go_auto_type_info's autocmd let result = go#complete#GetInfo() if !empty(result) @@ -142,12 +147,12 @@ function! go#complete#Info(auto) endif endfunction -function! s:trim_bracket(val) +function! s:trim_bracket(val) abort let a:val.word = substitute(a:val.word, '[(){}\[\]]\+$', '', '') return a:val endfunction -function! go#complete#Complete(findstart, base) +function! go#complete#Complete(findstart, base) abort "findstart = 1 when we need to get the text length if a:findstart == 1 execute "silent let g:gocomplete_completions = " . s:gocodeAutocomplete() @@ -162,7 +167,7 @@ function! go#complete#Complete(findstart, base) endif endf -function! go#complete#ToggleAutoTypeInfo() +function! go#complete#ToggleAutoTypeInfo() abort if get(g:, "go_auto_type_info", 0) let g:go_auto_type_info = 0 call go#util#EchoProgress("auto type info disabled") diff --git a/sources_non_forked/vim-go/autoload/go/coverage.vim b/sources_non_forked/vim-go/autoload/go/coverage.vim index f3d36c43..9b027861 100644 --- a/sources_non_forked/vim-go/autoload/go/coverage.vim +++ b/sources_non_forked/vim-go/autoload/go/coverage.vim @@ -3,7 +3,7 @@ let s:toggle = 0 " Buffer creates a new cover profile with 'go test -coverprofile' and changes " the current buffers highlighting to show covered and uncovered sections of " the code. If run again it clears the annotation. -function! go#coverage#BufferToggle(bang, ...) +function! go#coverage#BufferToggle(bang, ...) abort if s:toggle call go#coverage#Clear() return @@ -20,7 +20,7 @@ endfunction " teh current buffers highlighting to show covered and uncovered sections of " the code. Calling it again reruns the tests and shows the last updated " coverage. -function! go#coverage#Buffer(bang, ...) +function! go#coverage#Buffer(bang, ...) abort " we use matchaddpos() which was introduce with 7.4.330, be sure we have " it: http://ftp.vim.org/vim/patches/7.4/7.4.330 if !exists("*matchaddpos") @@ -43,8 +43,17 @@ function! go#coverage#Buffer(bang, ...) let s:toggle = 1 let l:tmpname = tempname() - let args = [a:bang, 0, "-coverprofile", l:tmpname] + if go#util#has_job() + call s:coverage_job({ + \ 'cmd': ['go', 'test', '-coverprofile', l:tmpname], + \ 'custom_cb': function('s:coverage_callback', [l:tmpname]), + \ 'bang': a:bang, + \ }) + return + endif + + let args = [a:bang, 0, "-coverprofile", l:tmpname] if a:0 call extend(args, a:000) endif @@ -75,11 +84,8 @@ function! go#coverage#Buffer(bang, ...) endfunction " Clear clears and resets the buffer annotation matches -function! go#coverage#Clear() - " only reset the syntax if the user has syntax enabled - if !empty(&syntax) - if exists("g:syntax_on") | syntax enable | endif - endif +function! go#coverage#Clear() abort + call clearmatches() if exists("s:toggle") | let s:toggle = 0 | endif @@ -87,25 +93,34 @@ function! go#coverage#Clear() if exists("#BufWinLeave#") autocmd! BufWinLeave endif - - call clearmatches() endfunction " Browser creates a new cover profile with 'go test -coverprofile' and opens " a new HTML coverage page from that profile in a new browser -function! go#coverage#Browser(bang, ...) +function! go#coverage#Browser(bang, ...) abort let l:tmpname = tempname() - let args = [a:bang, 0, "-coverprofile", l:tmpname] + if go#util#has_job() + call s:coverage_job({ + \ 'cmd': ['go', 'test', '-coverprofile', l:tmpname], + \ 'custom_cb': function('s:coverage_browser_callback', [l:tmpname]), + \ 'bang': a:bang, + \ }) + return + endif + let args = [a:bang, 0, "-coverprofile", l:tmpname] if a:0 call extend(args, a:000) endif + let id = call('go#cmd#Test', args) if has('nvim') call go#jobcontrol#AddHandler(function('s:coverage_browser_handler')) let s:coverage_browser_handler_jobs[id] = l:tmpname return endif + + if go#util#ShellError() == 0 let openHTML = 'go tool cover -html='.l:tmpname call go#tool#ExecuteInDir(openHTML) @@ -116,7 +131,7 @@ endfunction " Parses a single line from the cover file generated via go test -coverprofile " and returns a single coverage profile block. -function! go#coverage#parsegocoverline(line) +function! go#coverage#parsegocoverline(line) abort " file:startline.col,endline.col numstmt count let mx = '\([^:]\+\):\(\d\+\)\.\(\d\+\),\(\d\+\)\.\(\d\+\)\s\(\d\+\)\s\(\d\+\)' let tokens = matchlist(a:line, mx) @@ -133,7 +148,7 @@ endfunction " Generates matches to be added to matchaddpos for the given coverage profile " block -function! go#coverage#genmatch(cov) +function! go#coverage#genmatch(cov) abort let color = 'goCoverageCovered' if a:cov.cnt == 0 let color = 'goCoverageUncover' @@ -183,7 +198,7 @@ function! go#coverage#genmatch(cov) endfunction " Reads the given coverprofile file and annotates the current buffer -function! go#coverage#overlay(file) +function! go#coverage#overlay(file) abort if !filereadable(a:file) return endif @@ -204,7 +219,7 @@ function! go#coverage#overlay(file) let cnt += 1 endwhile - let fname = expand('%:t') + let fname = expand('%') " when called for a _test.go file, run the coverage for the actuall file " file @@ -221,6 +236,9 @@ function! go#coverage#overlay(file) exe ":edit ". fnamemodify(fname, ":p") endif + " cov.file includes only the filename itself, without full path + let fname = fnamemodify(fname, ":t") + for line in lines[1:] let cov = go#coverage#parsegocoverline(line) @@ -233,8 +251,6 @@ function! go#coverage#overlay(file) call extend(matches, go#coverage#genmatch(cov)) endfor - syntax manual - " clear the matches if we leave the buffer autocmd BufWinLeave call go#coverage#Clear() @@ -244,6 +260,78 @@ function! go#coverage#overlay(file) endfunction +" --------------------- +" | Vim job callbacks | +" --------------------- +" +function s:coverage_job(args) + " autowrite is not enabled for jobs + call go#cmd#autowrite() + + let status_dir = expand('%:p:h') + function! s:error_info_cb(job, exit_status, data) closure + let status = { + \ 'desc': 'last status', + \ 'type': "coverage", + \ 'state': "finished", + \ } + + if a:exit_status + let status.state = "failed" + endif + + call go#statusline#Update(status_dir, status) + endfunction + + let a:args.error_info_cb = function('s:error_info_cb') + let callbacks = go#job#Spawn(a:args) + + let start_options = { + \ 'callback': callbacks.callback, + \ 'close_cb': callbacks.close_cb, + \ } + + " modify GOPATH if needed + let old_gopath = $GOPATH + let $GOPATH = go#path#Detect() + + " pre start + let dir = getcwd() + let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' + let jobdir = fnameescape(expand("%:p:h")) + execute cd . jobdir + + call go#statusline#Update(status_dir, { + \ 'desc': "current status", + \ 'type': "coverage", + \ 'state': "started", + \}) + + call job_start(a:args.cmd, start_options) + + " post start + execute cd . fnameescape(dir) + let $GOPATH = old_gopath +endfunction + +" coverage_callback is called when the coverage execution is finished +function! s:coverage_callback(coverfile, job, exit_status, data) + if a:exit_status == 0 + call go#coverage#overlay(a:coverfile) + endif + + call delete(a:coverfile) +endfunction + +function! s:coverage_browser_callback(coverfile, job, exit_status, data) + if a:exit_status == 0 + let openHTML = 'go tool cover -html='.a:coverfile + call go#tool#ExecuteInDir(openHTML) + endif + + call delete(a:coverfile) +endfunction + " ----------------------- " | Neovim job handlers | " ----------------------- @@ -251,7 +339,7 @@ endfunction let s:coverage_handler_jobs = {} let s:coverage_browser_handler_jobs = {} -function! s:coverage_handler(job, exit_status, data) +function! s:coverage_handler(job, exit_status, data) abort if !has_key(s:coverage_handler_jobs, a:job.id) return endif @@ -264,7 +352,7 @@ function! s:coverage_handler(job, exit_status, data) unlet s:coverage_handler_jobs[a:job.id] endfunction -function! s:coverage_browser_handler(job, exit_status, data) +function! s:coverage_browser_handler(job, exit_status, data) abort if !has_key(s:coverage_browser_handler_jobs, a:job.id) return endif @@ -279,4 +367,5 @@ function! s:coverage_browser_handler(job, exit_status, data) unlet s:coverage_browser_handler_jobs[a:job.id] endfunction + " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/autoload/go/def.vim b/sources_non_forked/vim-go/autoload/go/def.vim index b7e22a1c..d3b51c26 100644 --- a/sources_non_forked/vim-go/autoload/go/def.vim +++ b/sources_non_forked/vim-go/autoload/go/def.vim @@ -1,7 +1,7 @@ let s:go_stack = [] let s:go_stack_level = 0 -function! go#def#Jump(mode) +function! go#def#Jump(mode) abort let old_gopath = $GOPATH let $GOPATH = go#path#Detect() @@ -27,42 +27,53 @@ function! go#def#Jump(mode) endif let command = printf("%s -f=%s -o=%s -t", bin_path, fname, go#util#OffsetCursor()) let out = go#util#System(command) - - " append the type information to the same line so our - " jump_to_declaration() function can parse it. This makes it - " compatible with guru definition as well too - let out = join(split(out, '\n'), ':') if exists("l:tmpname") call delete(l:tmpname) endif - elseif bin_name == 'guru' - let flags = "" - let in = "" - - if &modified - let sep = go#util#LineEnding() - let content = join(getline(1, '$'), sep) - let in = fname . "\n" . strlen(content) . "\n" . content - let flags .= " -modified" - endif - let bin_path = go#path#CheckBinPath("guru") if empty(bin_path) let $GOPATH = old_gopath return endif - if exists('g:go_guru_tags') - let tags = get(g:, 'go_guru_tags') - let flags .= printf(" -tags %s", tags) - endif - - let fname = shellescape(fname.':#'.go#util#OffsetCursor()) - let command = printf("%s %s definition %s", bin_path, flags, fname) + let cmd = [bin_path] + let stdin_content = "" if &modified - let out = go#util#System(command, in) + let sep = go#util#LineEnding() + let content = join(getline(1, '$'), sep) + let stdin_content = fname . "\n" . strlen(content) . "\n" . content + call add(cmd, "-modified") + endif + + if exists('g:go_guru_tags') + let tags = get(g:, 'go_guru_tags') + call extend(cmd, ["-tags", tags]) + endif + + let fname = fname.':#'.go#util#OffsetCursor() + call extend(cmd, ["definition", fname]) + + if go#util#has_job() + let l:spawn_args = { + \ 'cmd': cmd, + \ 'custom_cb': function('s:jump_to_declaration_cb', [a:mode, bin_name]), + \ } + + if &modified + let l:spawn_args.input = stdin_content + endif + + call go#util#EchoProgress("searching declaration ...") + + call s:def_job(spawn_args) + return + endif + + let command = join(cmd, " ") + if &modified + let out = go#util#System(command, stdin_content) else let out = go#util#System(command) endif @@ -76,13 +87,28 @@ function! go#def#Jump(mode) return endif - call s:jump_to_declaration(out, a:mode) + call s:jump_to_declaration(out, a:mode, bin_name) let $GOPATH = old_gopath endfunction -function! s:jump_to_declaration(out, mode) +function! s:jump_to_declaration_cb(mode, bin_name, job, exit_status, data) abort + if a:exit_status != 0 + return + endif + + call s:jump_to_declaration(a:data[0], a:mode, a:bin_name) +endfunction + +function! s:jump_to_declaration(out, mode, bin_name) abort + let final_out = a:out + if a:bin_name == "godef" + " append the type information to the same line so our we can parse it. + " This makes it compatible with guru output. + let final_out = join(split(a:out, '\n'), ':') + endif + " strip line ending - let out = split(a:out, go#util#LineEnding())[0] + let out = split(final_out, go#util#LineEnding())[0] if go#util#IsWin() let parts = split(out, '\(^[a-zA-Z]\)\@ q :call go#ui#CloseWindow() endfunction -function! go#def#StackClear(...) +function! go#def#StackClear(...) abort let s:go_stack = [] let s:go_stack_level = 0 endfunction -function! go#def#StackPop(...) +function! go#def#StackPop(...) abort if len(s:go_stack) == 0 call go#util#EchoError("godef stack empty") return @@ -220,7 +252,7 @@ function! go#def#StackPop(...) call go#def#Stack(newLevel + 1) endfunction -function! go#def#Stack(...) +function! go#def#Stack(...) abort if len(s:go_stack) == 0 call go#util#EchoError("godef stack empty") return @@ -248,7 +280,13 @@ function! go#def#Stack(...) let target = s:go_stack[s:go_stack_level] " jump - exec 'edit' target["file"] + if expand('%:p') != target["file"] + if &modified + exec 'hide edit' target["file"] + else + exec 'edit' target["file"] + endif + endif call cursor(target["line"], target["col"]) normal! zz else @@ -256,4 +294,27 @@ function! go#def#Stack(...) endif endfunction +function s:def_job(args) abort + function! s:error_info_cb(job, exit_status, data) closure + " do not print anything during async definition search&jump + endfunction + + let a:args.error_info_cb = function('s:error_info_cb') + let callbacks = go#job#Spawn(a:args) + + let start_options = { + \ 'callback': callbacks.callback, + \ 'close_cb': callbacks.close_cb, + \ } + + if &modified + let l:tmpname = tempname() + call writefile(split(a:args.input, "\n"), l:tmpname, "b") + let l:start_options.in_io = "file" + let l:start_options.in_name = l:tmpname + endif + + call job_start(a:args.cmd, start_options) +endfunction + " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/autoload/go/doc.vim b/sources_non_forked/vim-go/autoload/go/doc.vim index a65351f3..3756167d 100644 --- a/sources_non_forked/vim-go/autoload/go/doc.vim +++ b/sources_non_forked/vim-go/autoload/go/doc.vim @@ -12,57 +12,39 @@ if !exists("g:go_doc_options") let g:go_doc_options = "" endif -" returns the package and exported name. exported name might be empty. -" ie: fmt and Println -" ie: github.com/fatih/set and New -function! s:godocWord(args) - if !executable('godoc') - let msg = "godoc command not found." - let msg .= " install with: go get golang.org/x/tools/cmd/godoc" - call go#util#EchoWarning(msg) - return [] +function! go#doc#OpenBrowser(...) abort + " check if we have gogetdoc as it gives us more and accurate information. + " Only supported if we have json_decode as it's not worth to parse the plain + " non-json output of gogetdoc + let bin_path = go#path#CheckBinPath('gogetdoc') + if !empty(bin_path) && exists('*json_decode') + let json_out = s:gogetdoc(1) + if go#util#ShellError() != 0 + call go#util#EchoError(json_out) + return + endif + + let out = json_decode(json_out) + if type(out) != type({}) + call go#util#EchoError("gogetdoc output is malformed") + endif + + let import = out["import"] + let name = out["name"] + + " if import is empty, it means we selected a package name + if import ==# "" + let godoc_url = "https://godoc.org/" . name + else + let godoc_url = "https://godoc.org/" . import . "#" . name + endif + + echo godoc_url + + call go#tool#OpenBrowser(godoc_url) + return endif - if !len(a:args) - let oldiskeyword = &iskeyword - setlocal iskeyword+=. - let word = expand('') - let &iskeyword = oldiskeyword - let word = substitute(word, '[^a-zA-Z0-9\\/._~-]', '', 'g') - let words = split(word, '\.\ze[^./]\+$') - else - let words = a:args - endif - - if !len(words) - return [] - endif - - let pkg = words[0] - if len(words) == 1 - let exported_name = "" - else - let exported_name = words[1] - endif - - let packages = go#tool#Imports() - - if has_key(packages, pkg) - let pkg = packages[pkg] - endif - - return [pkg, exported_name] -endfunction - -function! s:godocNotFound(content) - if len(a:content) == 0 - return 1 - endif - - return a:content =~# '^.*: no such file or directory\n$' -endfunction - -function! go#doc#OpenBrowser(...) let pkgs = s:godocWord(a:000) if empty(pkgs) return @@ -76,7 +58,7 @@ function! go#doc#OpenBrowser(...) call go#tool#OpenBrowser(godoc_url) endfunction -function! go#doc#Open(newmode, mode, ...) +function! go#doc#Open(newmode, mode, ...) abort if len(a:000) " check if we have 'godoc' and use it automatically let bin_path = go#path#CheckBinPath('godoc') @@ -87,34 +69,7 @@ function! go#doc#Open(newmode, mode, ...) let command = printf("%s %s", bin_path, join(a:000, ' ')) let out = go#util#System(command) else - " check if we have 'gogetdoc' and use it automatically - let bin_path = go#path#CheckBinPath('gogetdoc') - if empty(bin_path) - return - endif - - let offset = go#util#OffsetCursor() - let fname = expand("%:p:gs!\\!/!") - let pos = shellescape(fname.':#'.offset) - let command = printf("%s -pos %s", bin_path, pos) - - if &modified - " gogetdoc supports the same archive format as guru for dealing with - " modified buffers. - " use the -modified flag - " write each archive entry on stdin as: - " filename followed by newline - " file size followed by newline - " file contents - let in = "" - let sep = go#util#LineEnding() - let content = join(getline(1, '$'), sep) - let in = fname . "\n" . strlen(content) . "\n" . content - let command .= " -modified" - let out = go#util#System(command, in) - else - let out = go#util#System(command) - endif + let out = s:gogetdoc(0) endif if go#util#ShellError() != 0 @@ -125,7 +80,7 @@ function! go#doc#Open(newmode, mode, ...) call s:GodocView(a:newmode, a:mode, out) endfunction -function! s:GodocView(newposition, position, content) +function! s:GodocView(newposition, position, content) abort " reuse existing buffer window if it exists otherwise create a new one if !bufexists(s:buf_nr) execute a:newposition @@ -169,4 +124,96 @@ function! s:GodocView(newposition, position, content) noremap :close endfunction +function! s:gogetdoc(json) abort + " check if we have 'gogetdoc' and use it automatically + let bin_path = go#path#CheckBinPath('gogetdoc') + if empty(bin_path) + return -1 + endif + + let cmd = [bin_path] + + let offset = go#util#OffsetCursor() + let fname = expand("%:p:gs!\\!/!") + let pos = shellescape(fname.':#'.offset) + + let cmd += ["-pos", pos] + if a:json + let cmd += ["-json"] + endif + + let command = join(cmd, " ") + + if &modified + " gogetdoc supports the same archive format as guru for dealing with + " modified buffers. + " use the -modified flag + " write each archive entry on stdin as: + " filename followed by newline + " file size followed by newline + " file contents + let in = "" + let sep = go#util#LineEnding() + let content = join(getline(1, '$'), sep) + let in = fname . "\n" . strlen(content) . "\n" . content + let command .= " -modified" + let out = go#util#System(command, in) + else + let out = go#util#System(command) + endif + + return out +endfunction + +" returns the package and exported name. exported name might be empty. +" ie: fmt and Println +" ie: github.com/fatih/set and New +function! s:godocWord(args) abort + if !executable('godoc') + let msg = "godoc command not found." + let msg .= " install with: go get golang.org/x/tools/cmd/godoc" + call go#util#EchoWarning(msg) + return [] + endif + + if !len(a:args) + let oldiskeyword = &iskeyword + setlocal iskeyword+=. + let word = expand('') + let &iskeyword = oldiskeyword + let word = substitute(word, '[^a-zA-Z0-9\\/._~-]', '', 'g') + let words = split(word, '\.\ze[^./]\+$') + else + let words = a:args + endif + + if !len(words) + return [] + endif + + let pkg = words[0] + if len(words) == 1 + let exported_name = "" + else + let exported_name = words[1] + endif + + let packages = go#tool#Imports() + + if has_key(packages, pkg) + let pkg = packages[pkg] + endif + + return [pkg, exported_name] +endfunction + +function! s:godocNotFound(content) abort + if len(a:content) == 0 + return 1 + endif + + return a:content =~# '^.*: no such file or directory\n$' +endfunction + + " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/autoload/go/fmt.vim b/sources_non_forked/vim-go/autoload/go/fmt.vim index b55ba83d..391fca93 100644 --- a/sources_non_forked/vim-go/autoload/go/fmt.vim +++ b/sources_non_forked/vim-go/autoload/go/fmt.vim @@ -51,7 +51,7 @@ endif " it doesn't undo changes and break undo history. If you are here reading " this and have VimL experience, please look at the function for " improvements, patches are welcome :) -function! go#fmt#Format(withGoimport) +function! go#fmt#Format(withGoimport) abort if g:go_fmt_experimental == 1 " Using winsaveview to save/restore cursor state has the problem of " closing folds on save: @@ -185,7 +185,7 @@ function! go#fmt#Format(withGoimport) % | " Couldn't detect gofmt error format, output errors endif if !empty(errors) - call go#list#Populate(l:listtype, errors) + call go#list#Populate(l:listtype, errors, 'Format') echohl Error | echomsg "Gofmt returned error" | echohl None endif @@ -215,7 +215,7 @@ function! go#fmt#Format(withGoimport) endif endfunction -function! go#fmt#ToggleFmtAutoSave() +function! go#fmt#ToggleFmtAutoSave() abort if get(g:, "go_fmt_autosave", 1) let g:go_fmt_autosave = 0 call go#util#EchoProgress("auto fmt disabled") diff --git a/sources_non_forked/vim-go/autoload/go/guru.vim b/sources_non_forked/vim-go/autoload/go/guru.vim index c1f7f193..78cacc0b 100644 --- a/sources_non_forked/vim-go/autoload/go/guru.vim +++ b/sources_non_forked/vim-go/autoload/go/guru.vim @@ -1,47 +1,63 @@ " guru.vim -- Vim integration for the Go guru. -func! s:RunGuru(mode, format, selected, needs_scope) range abort +" guru_cmd returns a dict that contains the command to execute guru. option +" is dict with following options: +" mode : guru mode, such as 'implements' +" format : output format, either 'plain' or 'json' +" needs_scope : if 1, adds the current package to the scope +" selected : if 1, means it's a range of selection, otherwise it picks up the +" offset under the cursor +" example output: +" {'cmd' : ['guru', '-json', 'implements', 'demo/demo.go:#66']} +function! s:guru_cmd(args) range abort + let mode = a:args.mode + let format = a:args.format + let needs_scope = a:args.needs_scope + let selected = a:args.selected + + let result = {} + let dirname = expand('%:p:h') + let pkg = go#package#ImportPath(dirname) + + " this is important, check it! + if pkg == -1 && needs_scope + return {'err': "current directory is not inside of a valid GOPATH"} + endif + "return with a warning if the binary doesn't exist let bin_path = go#path#CheckBinPath("guru") if empty(bin_path) return {'err': "bin path not found"} endif - let dirname = expand('%:p:h') - let pkg = go#package#ImportPath(dirname) - - " this is important, check it! - if pkg == -1 && a:needs_scope - return {'err': "current directory is not inside of a valid GOPATH"} - endif - - " start constructing the 'command' variable - let command = bin_path + " start constructing the command + let cmd = [bin_path] let filename = fnamemodify(expand("%"), ':p:gs?\\?/?') - let in = "" + let stdin_content = "" if &modified let sep = go#util#LineEnding() let content = join(getline(1, '$'), sep ) - let in = filename . "\n" . strlen(content) . "\n" . content - let command .= " -modified" + let result.stdin_content = filename . "\n" . strlen(content) . "\n" . content + call add(cmd, "-modified") endif " enable outputting in json format - if a:format == "json" - let command .= " -json" + if format == "json" + call add(cmd, "-json") endif " check for any tags if exists('g:go_guru_tags') let tags = get(g:, 'go_guru_tags') - let command .= printf(" -tags %s", tags) + call extend(cmd, ["-tags", tags]) + let result.tags = tags endif " some modes require scope to be defined (such as callers). For these we " choose a sensible setting, which is using the current file's package let scopes = [] - if a:needs_scope + if needs_scope let scopes = [pkg] endif @@ -66,274 +82,421 @@ func! s:RunGuru(mode, format, selected, needs_scope) range abort let scopes = go#util#StripTrailingSlash(scopes) " create shell-safe entries of the list - let scopes = go#util#Shelllist(scopes) + if !go#util#has_job() | let scopes = go#util#Shelllist(scopes) | endif " guru expect a comma-separated list of patterns, construct it let l:scope = join(scopes, ",") - let command .= printf(" -scope %s", l:scope) + let result.scope = l:scope + call extend(cmd, ["-scope", l:scope]) endif let pos = printf("#%s", go#util#OffsetCursor()) - if a:selected != -1 + if selected != -1 " means we have a range, get it let pos1 = go#util#Offset(line("'<"), col("'<")) let pos2 = go#util#Offset(line("'>"), col("'>")) let pos = printf("#%s,#%s", pos1, pos2) endif - " this is our final command let filename .= ':'.pos - let command .= printf(' %s %s', a:mode, shellescape(filename)) + call extend(cmd, [mode, filename]) + + let result.cmd = cmd + return result +endfunction + +" sync_guru runs guru in sync mode with the given arguments +function! s:sync_guru(args) abort + let result = s:guru_cmd(a:args) + if has_key(result, 'err') + call go#util#EchoError(result.err) + return -1 + endif + + if !has_key(a:args, 'disable_progress') + if a:args.needs_scope + call go#util#EchoProgress("analysing with scope ". result.scope . " ...") + elseif a:args.mode !=# 'what' + " the query might take time, let us give some feedback + call go#util#EchoProgress("analysing ...") + endif + endif let old_gopath = $GOPATH let $GOPATH = go#path#Detect() - if a:needs_scope - call go#util#EchoProgress("analysing with scope ". l:scope . " ...") - elseif a:mode !=# 'what' - " the query might take time, let us give some feedback - call go#util#EchoProgress("analysing ...") - endif - " run, forrest run!!! + let command = join(result.cmd, " ") if &modified - let out = go#util#System(command, in) + let out = go#util#System(command, result.stdin_content) else let out = go#util#System(command) endif let $GOPATH = old_gopath - if go#util#ShellError() != 0 - " the output contains the error message - return {'err' : out} + + if has_key(a:args, 'custom_parse') + call a:args.custom_parse(go#util#ShellError(), out) + else + call s:parse_guru_output(go#util#ShellError(), out, a:args.mode) endif - return {'out': out} + return out endfunc -" This uses Vim's errorformat to parse the output from Guru's 'plain output -" and put it into location list. I believe using errorformat is much more -" easier to use. If we need more power we can always switch back to parse it -" via regex. -func! s:loclistSecond(output) - " backup users errorformat, will be restored once we are finished - let old_errorformat = &errorformat - - " match two possible styles of errorformats: - " - " 'file:line.col-line2.col2: message' - " 'file:line:col: message' - " - " We discard line2 and col2 for the first errorformat, because it's not - " useful and location only has the ability to show one line and column - " number - let errformat = "%f:%l.%c-%[%^:]%#:\ %m,%f:%l:%c:\ %m" - call go#list#ParseFormat("locationlist", errformat, split(a:output, "\n")) - - let errors = go#list#Get("locationlist") - call go#list#Window("locationlist", len(errors)) -endfun - - -function! go#guru#Scope(...) - if a:0 - if a:0 == 1 && a:1 == '""' - unlet g:go_guru_scope - call go#util#EchoSuccess("guru scope is cleared") - else - let g:go_guru_scope = a:000 - call go#util#EchoSuccess("guru scope changed to: ". join(a:000, ",")) - endif - +" async_guru runs guru in async mode with the given arguments +function! s:async_guru(args) abort + let result = s:guru_cmd(a:args) + if has_key(result, 'err') + call go#util#EchoError(result.err) return endif - if !exists('g:go_guru_scope') - call go#util#EchoError("guru scope is not set") - else - call go#util#EchoSuccess("current guru scope: ". join(g:go_guru_scope, ",")) + let status_dir = expand('%:p:h') + let statusline_type = printf("%s", a:args.mode) + + if !has_key(a:args, 'disable_progress') + if a:args.needs_scope + call go#util#EchoProgress("analysing with scope ". result.scope . " ...") + endif endif + + function! s:close_cb(chan) closure + let messages = [] + while ch_status(a:chan, {'part': 'out'}) == 'buffered' + let msg = ch_read(a:chan, {'part': 'out'}) + call add(messages, msg) + endwhile + + while ch_status(a:chan, {'part': 'err'}) == 'buffered' + let msg = ch_read(a:chan, {'part': 'err'}) + call add(messages, msg) + endwhile + + let l:job = ch_getjob(a:chan) + let l:info = job_info(l:job) + + let out = join(messages, "\n") + + let status = { + \ 'desc': 'last status', + \ 'type': statusline_type, + \ 'state': "finished", + \ } + + if l:info.exitval + let status.state = "failed" + endif + + call go#statusline#Update(status_dir, status) + + if has_key(a:args, 'custom_parse') + call a:args.custom_parse(l:info.exitval, out) + else + call s:parse_guru_output(l:info.exitval, out, a:args.mode) + endif + endfunction + + let start_options = { + \ 'close_cb': function("s:close_cb"), + \ } + + if &modified + let l:tmpname = tempname() + call writefile(split(result.stdin_content, "\n"), l:tmpname, "b") + let l:start_options.in_io = "file" + let l:start_options.in_name = l:tmpname + endif + + call go#statusline#Update(status_dir, { + \ 'desc': "current status", + \ 'type': statusline_type, + \ 'state': "analysing", + \}) + + return job_start(result.cmd, start_options) +endfunc + +" run_guru runs the given guru argument +function! s:run_guru(args) abort + if go#util#has_job() + return s:async_guru(a:args) + endif + + return s:sync_guru(a:args) endfunction -function! go#guru#Tags(...) - if a:0 - if a:0 == 1 && a:1 == '""' - unlet g:go_guru_tags - call go#util#EchoSuccess("guru tags is cleared") - else - let g:go_guru_tags = a:1 - call go#util#EchoSuccess("guru tags changed to: ". a:1) - endif +" Show 'implements' relation for selected package +function! go#guru#Implements(selected) abort + let args = { + \ 'mode': 'implements', + \ 'format': 'plain', + \ 'selected': a:selected, + \ 'needs_scope': 1, + \ } - return - endif - - if !exists('g:go_guru_tags') - call go#util#EchoSuccess("guru tags is not set") - else - call go#util#EchoSuccess("current guru tags: ". a:1) - endif + call s:run_guru(args) endfunction " Report the possible constants, global variables, and concrete types that may " appear in a value of type error -function! go#guru#Whicherrs(selected) - let out = s:RunGuru('whicherrs', 'plain', a:selected, 1) - if has_key(out, 'err') - call go#util#EchoError(out.err) - return - endif +function! go#guru#Whicherrs(selected) abort + let args = { + \ 'mode': 'whicherrs', + \ 'format': 'plain', + \ 'selected': a:selected, + \ 'needs_scope': 1, + \ } - if empty(out.out) - call go#util#EchoSuccess("no error variables found. Try to change the scope with :GoGuruScope") - return - endif - call s:loclistSecond(out.out) -endfunction - -" Show 'implements' relation for selected package -function! go#guru#Implements(selected) - let out = s:RunGuru('implements', 'plain', a:selected, 1) - if has_key(out, 'err') - call go#util#EchoError(out.err) - return - endif - - call s:loclistSecond(out.out) + " TODO(arslan): handle empty case for both sync/async + " if empty(out.out) + " call go#util#EchoSuccess("no error variables found. Try to change the scope with :GoGuruScope") + " return + " endif + call s:run_guru(args) endfunction " Describe selected syntax: definition, methods, etc -function! go#guru#Describe(selected) - let out = s:RunGuru('describe', 'plain', a:selected, 0) - if has_key(out, 'err') - call go#util#EchoError(out.err) +function! go#guru#Describe(selected) abort + let args = { + \ 'mode': 'describe', + \ 'format': 'plain', + \ 'selected': a:selected, + \ 'needs_scope': 1, + \ } + + call s:run_guru(args) +endfunction + +function! go#guru#DescribeInfo() abort + " json_encode() and friends are introduced with this patch (7.4.1304) + " vim: https://groups.google.com/d/msg/vim_dev/vLupTNhQhZ8/cDGIk0JEDgAJ + " nvim: https://github.com/neovim/neovim/pull/4131 + if !exists("*json_decode") + call go#util#EchoError("requires 'json_decode'. Update your Vim/Neovim version.") return endif - call s:loclistSecond(out.out) + function! s:info(exit_val, output) + if a:exit_val != 0 + return + endif + + if a:output[0] !=# '{' + return + endif + + if empty(a:output) || type(a:output) != type("") + return + endif + + let result = json_decode(a:output) + if type(result) != type({}) + call go#util#EchoError(printf("malformed output from guru: %s", a:output)) + return + endif + + if !has_key(result, 'detail') + " if there is no detail check if there is a description and print it + if has_key(result, "desc") + call go#util#EchoInfo(result["desc"]) + return + endif + + call go#util#EchoError("detail key is missing. Please open a bug report on vim-go repo.") + return + endif + + let detail = result['detail'] + let info = "" + + " guru gives different information based on the detail mode. Let try to + " extract the most useful information + + if detail == "value" + if !has_key(result, 'value') + call go#util#EchoError("value key is missing. Please open a bug report on vim-go repo.") + return + endif + + let val = result["value"] + if !has_key(val, 'type') + call go#util#EchoError("type key is missing (value.type). Please open a bug report on vim-go repo.") + return + endif + + let info = val["type"] + elseif detail == "type" + if !has_key(result, 'type') + call go#util#EchoError("type key is missing. Please open a bug report on vim-go repo.") + return + endif + + let type = result["type"] + if !has_key(type, 'type') + call go#util#EchoError("type key is missing (type.type). Please open a bug report on vim-go repo.") + return + endif + + let info = type["type"] + elseif detail == "package" + if !has_key(result, 'package') + call go#util#EchoError("package key is missing. Please open a bug report on vim-go repo.") + return + endif + + let package = result["package"] + if !has_key(package, 'path') + call go#util#EchoError("path key is missing (package.path). Please open a bug report on vim-go repo.") + return + endif + + let info = printf("package %s", package["path"]) + elseif detail == "unknown" + let info = result["desc"] + else + call go#util#EchoError(printf("unknown detail mode found '%s'. Please open a bug report on vim-go repo", detail)) + return + endif + + call go#util#EchoInfo(info) + endfunction + + let args = { + \ 'mode': 'describe', + \ 'format': 'json', + \ 'selected': -1, + \ 'needs_scope': 1, + \ 'custom_parse': function('s:info'), + \ 'disable_progress': 1, + \ } + + call s:run_guru(args) endfunction " Show possible targets of selected function call -function! go#guru#Callees(selected) - let out = s:RunGuru('callees', 'plain', a:selected, 1) - if has_key(out, 'err') - call go#util#EchoError(out.err) - return - endif +function! go#guru#Callees(selected) abort + let args = { + \ 'mode': 'callees', + \ 'format': 'plain', + \ 'selected': a:selected, + \ 'needs_scope': 1, + \ } - call s:loclistSecond(out.out) + call s:run_guru(args) endfunction " Show possible callers of selected function -function! go#guru#Callers(selected) - let out = s:RunGuru('callers', 'plain', a:selected, 1) - if has_key(out, 'err') - call go#util#EchoError(out.err) - return - endif +function! go#guru#Callers(selected) abort + let args = { + \ 'mode': 'callers', + \ 'format': 'plain', + \ 'selected': a:selected, + \ 'needs_scope': 1, + \ } - call s:loclistSecond(out.out) + call s:run_guru(args) endfunction " Show path from callgraph root to selected function -function! go#guru#Callstack(selected) - let out = s:RunGuru('callstack', 'plain', a:selected, 1) - if has_key(out, 'err') - call go#util#EchoError(out.err) - return - endif +function! go#guru#Callstack(selected) abort + let args = { + \ 'mode': 'callstack', + \ 'format': 'plain', + \ 'selected': a:selected, + \ 'needs_scope': 1, + \ } - call s:loclistSecond(out.out) + call s:run_guru(args) endfunction " Show free variables of selection -function! go#guru#Freevars(selected) +function! go#guru#Freevars(selected) abort " Freevars requires a selection if a:selected == -1 call go#util#EchoError("GoFreevars requires a selection (range) of code") return endif - let out = s:RunGuru('freevars', 'plain', a:selected, 0) - if has_key(out, 'err') - call go#util#EchoError(out.err) - return - endif + let args = { + \ 'mode': 'freevars', + \ 'format': 'plain', + \ 'selected': 1, + \ 'needs_scope': 0, + \ } - call s:loclistSecond(out.out) + call s:run_guru(args) endfunction " Show send/receive corresponding to selected channel op -function! go#guru#ChannelPeers(selected) - let out = s:RunGuru('peers', 'plain', a:selected, 1) - if has_key(out, 'err') - call go#util#EchoError(out.err) - return - endif +function! go#guru#ChannelPeers(selected) abort + let args = { + \ 'mode': 'peers', + \ 'format': 'plain', + \ 'selected': a:selected, + \ 'needs_scope': 1, + \ } - call s:loclistSecond(out.out) + call s:run_guru(args) endfunction " Show all refs to entity denoted by selected identifier -function! go#guru#Referrers(selected) - let out = s:RunGuru('referrers', 'plain', a:selected, 0) - if has_key(out, 'err') - call go#util#EchoError(out.err) +function! go#guru#Referrers(selected) abort + let args = { + \ 'mode': 'referrers', + \ 'format': 'plain', + \ 'selected': a:selected, + \ 'needs_scope': 0, + \ } + + call s:run_guru(args) +endfunction + +function! go#guru#SameIdsTimer() abort + call timer_start(200, function('go#guru#SameIds'), {'repeat': -1}) +endfunction + +function! go#guru#SameIds() abort + " we use matchaddpos() which was introduce with 7.4.330, be sure we have + " it: http://ftp.vim.org/vim/patches/7.4/7.4.330 + if !exists("*matchaddpos") + call go#util#EchoError("GoSameIds requires 'matchaddpos'. Update your Vim/Neovim version.") return endif - call s:loclistSecond(out.out) -endfunction - -function! go#guru#What(selected) " json_encode() and friends are introduced with this patch (7.4.1304) " vim: https://groups.google.com/d/msg/vim_dev/vLupTNhQhZ8/cDGIk0JEDgAJ " nvim: https://github.com/neovim/neovim/pull/4131 if !exists("*json_decode") - return {'err': "GoWhat is not supported due old version of Vim/Neovim"} - endif - - let out = s:RunGuru('what', 'json', a:selected, 0) - if has_key(out, 'err') - return {'err': out.err} - endif - - let result = json_decode(out.out) - - if type(result) != type({}) - return {'err': "malformed output from guru"} - endif - - return result -endfunction - -function! go#guru#AutoToogleSameIds() - if get(g:, "go_auto_sameids", 0) - call go#util#EchoProgress("sameids auto highlighting disabled") - call go#guru#ClearSameIds() - let g:go_auto_sameids = 0 + call go#util#EchoError("GoSameIds requires 'json_decode'. Update your Vim/Neovim version.") return endif - call go#util#EchoSuccess("sameids auto highlighting enabled") - let g:go_auto_sameids = 1 + let args = { + \ 'mode': 'what', + \ 'format': 'json', + \ 'selected': -1, + \ 'needs_scope': 0, + \ 'custom_parse': function('s:same_ids_highlight'), + \ } + + call s:run_guru(args) endfunction -function! go#guru#SameIds(selected) - " we use matchaddpos() which was introduce with 7.4.330, be sure we have - " it: http://ftp.vim.org/vim/patches/7.4/7.4.330 - if !exists("*matchaddpos") - call go#util#EchoError("GoSameIds is supported with Vim version 7.4-330 or later") - return - endif - - let result = go#guru#What(a:selected) - +function! s:same_ids_highlight(exit_val, output) abort call go#guru#ClearSameIds() " run after calling guru to reduce flicker. - if has_key(result, 'err') && !get(g:, 'go_auto_sameids', 0) - " only echo if it's called via `:GoSameIds, but not if it's in automode - call go#util#EchoError(result.err) + + if a:output[0] !=# '{' + if !get(g:, 'go_auto_sameids', 0) + call go#util#EchoError(a:output) + endif + return + endif + + let result = json_decode(a:output) + if type(result) != type({}) && !get(g:, 'go_auto_sameids', 0) + call go#util#EchoError("malformed output from guru") return endif @@ -367,11 +530,11 @@ function! go#guru#SameIds(selected) if get(g:, "go_auto_sameids", 0) " re-apply SameIds at the current cursor position at the time the buffer " is redisplayed: e.g. :edit, :GoRename, etc. - autocmd BufWinEnter nested call go#guru#SameIds(-1) + autocmd BufWinEnter nested call go#guru#SameIds() endif endfunction -function! go#guru#ClearSameIds() +function! go#guru#ClearSameIds() abort let m = getmatches() for item in m if item['group'] == 'goSameId' @@ -385,11 +548,94 @@ function! go#guru#ClearSameIds() endif endfunction -function! go#guru#ToggleSameIds(selected) +function! go#guru#ToggleSameIds() abort if len(getmatches()) != 0 call go#guru#ClearSameIds() else - call go#guru#SameIds(a:selected) + call go#guru#SameIds() + endif +endfunction + +function! go#guru#AutoToogleSameIds() abort + if get(g:, "go_auto_sameids", 0) + call go#util#EchoProgress("sameids auto highlighting disabled") + call go#guru#ClearSameIds() + let g:go_auto_sameids = 0 + return + endif + + call go#util#EchoSuccess("sameids auto highlighting enabled") + let g:go_auto_sameids = 1 +endfunction + + +"""""""""""""""""""""""""""""""""""""""" +"" HELPER FUNCTIONS +"""""""""""""""""""""""""""""""""""""""" + +" This uses Vim's errorformat to parse the output from Guru's 'plain output +" and put it into location list. I believe using errorformat is much more +" easier to use. If we need more power we can always switch back to parse it +" via regex. Match two possible styles of errorformats: +" +" 'file:line.col-line2.col2: message' +" 'file:line:col: message' +" +" We discard line2 and col2 for the first errorformat, because it's not +" useful and location only has the ability to show one line and column +" number +function! s:parse_guru_output(exit_val, output, title) abort + if a:exit_val + call go#util#EchoError(a:output) + return + endif + + let old_errorformat = &errorformat + let errformat = "%f:%l.%c-%[%^:]%#:\ %m,%f:%l:%c:\ %m" + call go#list#ParseFormat("locationlist", errformat, a:output, a:title) + let &errorformat = old_errorformat + + let errors = go#list#Get("locationlist") + call go#list#Window("locationlist", len(errors)) +endfun + +function! go#guru#Scope(...) abort + if a:0 + if a:0 == 1 && a:1 == '""' + unlet g:go_guru_scope + call go#util#EchoSuccess("guru scope is cleared") + else + let g:go_guru_scope = a:000 + call go#util#EchoSuccess("guru scope changed to: ". join(a:000, ",")) + endif + + return + endif + + if !exists('g:go_guru_scope') + call go#util#EchoError("guru scope is not set") + else + call go#util#EchoSuccess("current guru scope: ". join(g:go_guru_scope, ",")) + endif +endfunction + +function! go#guru#Tags(...) abort + if a:0 + if a:0 == 1 && a:1 == '""' + unlet g:go_guru_tags + call go#util#EchoSuccess("guru tags is cleared") + else + let g:go_guru_tags = a:1 + call go#util#EchoSuccess("guru tags changed to: ". a:1) + endif + + return + endif + + if !exists('g:go_guru_tags') + call go#util#EchoSuccess("guru tags is not set") + else + call go#util#EchoSuccess("current guru tags: ". a:1) endif endfunction diff --git a/sources_non_forked/vim-go/autoload/go/impl.vim b/sources_non_forked/vim-go/autoload/go/impl.vim index fce4a29b..139dba75 100644 --- a/sources_non_forked/vim-go/autoload/go/impl.vim +++ b/sources_non_forked/vim-go/autoload/go/impl.vim @@ -1,4 +1,4 @@ -function! go#impl#Impl(...) +function! go#impl#Impl(...) abort let binpath = go#path#CheckBinPath('impl') if empty(binpath) return @@ -69,7 +69,7 @@ else endfunction endif -function! s:root_dirs() +function! s:root_dirs() abort let dirs = [] let root = go#util#goroot() if root !=# '' && isdirectory(root) @@ -88,7 +88,7 @@ function! s:root_dirs() return dirs endfunction -function! s:go_packages(dirs) +function! s:go_packages(dirs) abort let pkgs = [] for d in a:dirs let pkg_root = expand(d . '/pkg/' . go#util#osarch()) @@ -97,7 +97,7 @@ function! s:go_packages(dirs) return map(pkgs, "fnamemodify(v:val, ':t:r')") endfunction -function! s:interface_list(pkg) +function! s:interface_list(pkg) abort let contents = split(go#util#System('go doc ' . a:pkg), "\n") if go#util#ShellError() return [] @@ -108,7 +108,7 @@ function! s:interface_list(pkg) endfunction " Complete package and interface for {interface} -function! go#impl#Complete(arglead, cmdline, cursorpos) +function! go#impl#Complete(arglead, cmdline, cursorpos) abort let words = split(a:cmdline, '\s\+', 1) if words[-1] ==# '' return s:uniq(sort(s:go_packages(s:root_dirs()))) diff --git a/sources_non_forked/vim-go/autoload/go/import.vim b/sources_non_forked/vim-go/autoload/go/import.vim index 69658916..8d9e8d4c 100644 --- a/sources_non_forked/vim-go/autoload/go/import.vim +++ b/sources_non_forked/vim-go/autoload/go/import.vim @@ -4,7 +4,7 @@ " " Check out the docs for more information at /doc/vim-go.txt " -function! go#import#SwitchImport(enabled, localname, path, bang) +function! go#import#SwitchImport(enabled, localname, path, bang) abort let view = winsaveview() let path = substitute(a:path, '^\s*\(.\{-}\)\s*$', '\1', '') @@ -205,7 +205,7 @@ function! go#import#SwitchImport(enabled, localname, path, bang) endfunction -function! s:Error(s) +function! s:Error(s) abort echohl Error | echo a:s | echohl None endfunction diff --git a/sources_non_forked/vim-go/autoload/go/job.vim b/sources_non_forked/vim-go/autoload/go/job.vim new file mode 100644 index 00000000..e60b2b45 --- /dev/null +++ b/sources_non_forked/vim-go/autoload/go/job.vim @@ -0,0 +1,109 @@ +" Spawn returns callbacks to be used with job_start. It's abstracted to be +" used with various go command, such as build, test, install, etc.. This avoid +" us to write the same callback over and over for some commands. It's fully +" customizable so each command can change it to it's own logic. +function go#job#Spawn(args) + let cbs = { + \ 'winnr': winnr(), + \ 'dir': getcwd(), + \ 'jobdir': fnameescape(expand("%:p:h")), + \ 'messages': [], + \ 'args': a:args.cmd, + \ 'bang': 0, + \ } + + if has_key(a:args, 'bang') + let cbs.bang = a:args.bang + endif + + " add final callback to be called if async job is finished + " The signature should be in form: func(job, exit_status, messages) + if has_key(a:args, 'custom_cb') + let cbs.custom_cb = a:args.custom_cb + endif + + if has_key(a:args, 'error_info_cb') + let cbs.error_info_cb = a:args.error_info_cb + endif + + function cbs.callback(chan, msg) dict + call add(self.messages, a:msg) + endfunction + + function cbs.close_cb(chan) dict + let l:job = ch_getjob(a:chan) + let l:status = job_status(l:job) + + " the job might be in fail status, we assume by default it's failed. + " However if it's dead, we can use the real exitval + let exitval = 1 + if l:status == "dead" + let l:info = job_info(l:job) + let exitval = l:info.exitval + endif + + if has_key(self, 'custom_cb') + call self.custom_cb(l:job, exitval, self.messages) + endif + + if has_key(self, 'error_info_cb') + call self.error_info_cb(l:job, exitval, self.messages) + endif + + if get(g:, 'go_echo_command_info', 1) + if exitval == 0 + call go#util#EchoSuccess("SUCCESS") + else + call go#util#EchoError("FAILED") + endif + endif + + let l:listtype = go#list#Type("quickfix") + if exitval == 0 + call go#list#Clean(l:listtype) + call go#list#Window(l:listtype) + return + endif + + call self.show_errors(l:listtype) + endfunction + + function cbs.show_errors(listtype) dict + let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' + try + execute cd self.jobdir + let errors = go#tool#ParseErrors(self.messages) + let errors = go#tool#FilterValids(errors) + finally + execute cd . fnameescape(self.dir) + endtry + + if !len(errors) + " failed to parse errors, output the original content + call go#util#EchoError(join(self.messages, " ")) + call go#util#EchoError(self.dir) + return + endif + + if self.winnr == winnr() + call go#list#Populate(a:listtype, errors, join(self.args)) + call go#list#Window(a:listtype, len(errors)) + if !empty(errors) && !self.bang + call go#list#JumpToFirst(a:listtype) + endif + endif + endfunction + + " override callback handler if user provided it + if has_key(a:args, 'callback') + let cbs.callback = a:args.callback + endif + + " override close callback handler if user provided it + if has_key(a:args, 'close_cb') + let cbs.close_cb = a:args.close_cb + endif + + return cbs +endfunction +" vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/autoload/go/jobcontrol.vim b/sources_non_forked/vim-go/autoload/go/jobcontrol.vim index e03c75d6..189ed5f4 100644 --- a/sources_non_forked/vim-go/autoload/go/jobcontrol.vim +++ b/sources_non_forked/vim-go/autoload/go/jobcontrol.vim @@ -9,7 +9,7 @@ let s:handlers = {} " Spawn is a wrapper around s:spawn. It can be executed by other files and " scripts if needed. Desc defines the description for printing the status " during the job execution (useful for statusline integration). -function! go#jobcontrol#Spawn(bang, desc, args) +function! go#jobcontrol#Spawn(bang, desc, args) abort " autowrite is not enabled for jobs call go#cmd#autowrite() @@ -17,31 +17,8 @@ function! go#jobcontrol#Spawn(bang, desc, args) return job.id endfunction -" Statusline returns the current status of the job -function! go#jobcontrol#Statusline() abort - if empty(s:jobs) - return '' - endif - - let import_path = go#package#ImportPath(expand('%:p:h')) - - for job in values(s:jobs) - if job.importpath != import_path - continue - endif - - if job.state == "SUCCESS" - return '' - endif - - return printf("%s ... [%s]", job.desc, job.state) - endfor - - return '' -endfunction - " AddHandler adds a on_exit callback handler and returns the id. -function! go#jobcontrol#AddHandler(handler) +function! go#jobcontrol#AddHandler(handler) abort let i = len(s:handlers) while has_key(s:handlers, string(i)) let i += 1 @@ -52,7 +29,7 @@ function! go#jobcontrol#AddHandler(handler) endfunction " RemoveHandler removes a callback handler by id. -function! go#jobcontrol#RemoveHandler(id) +function! go#jobcontrol#RemoveHandler(id) abort unlet s:handlers[a:id] endfunction @@ -60,10 +37,10 @@ endfunction " a job is started a reference will be stored inside s:jobs. spawn changes the " GOPATH when g:go_autodetect_gopath is enabled. The job is started inside the " current files folder. -function! s:spawn(bang, desc, args) - let job = { - \ 'desc': a:desc, - \ 'bang': a:bang, +function! s:spawn(bang, desc, args) abort + let job = { + \ 'desc': a:desc, + \ 'bang': a:bang, \ 'winnr': winnr(), \ 'importpath': go#package#ImportPath(expand('%:p:h')), \ 'state': "RUNNING", @@ -113,7 +90,7 @@ endfunction " references and also displaying errors in the quickfix window collected by " on_stderr handler. If there are no errors and a quickfix window is open, " it'll be closed. -function! s:on_exit(job_id, exit_status) +function! s:on_exit(job_id, exit_status, event) dict abort let std_combined = self.stderr + self.stdout let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' @@ -122,9 +99,10 @@ function! s:on_exit(job_id, exit_status) call s:callback_handlers_on_exit(s:jobs[a:job_id], a:exit_status, std_combined) + let l:listtype = go#list#Type("quickfix") if a:exit_status == 0 - call go#list#Clean(0) - call go#list#Window(0) + call go#list#Clean(l:listtype) + call go#list#Window(l:listtype) let self.state = "SUCCESS" call go#util#EchoSuccess("SUCCESS") @@ -149,8 +127,7 @@ function! s:on_exit(job_id, exit_status) " if we are still in the same windows show the list if self.winnr == winnr() - let l:listtype = "locationlist" - call go#list#Populate(l:listtype, errors) + call go#list#Populate(l:listtype, errors, self.desc) call go#list#Window(l:listtype, len(errors)) if !empty(errors) && !self.bang call go#list#JumpToFirst(l:listtype) @@ -159,7 +136,7 @@ function! s:on_exit(job_id, exit_status) endfunction " callback_handlers_on_exit runs all handlers for job on exit event. -function! s:callback_handlers_on_exit(job, exit_status, data) +function! s:callback_handlers_on_exit(job, exit_status, data) abort if empty(s:handlers) return endif @@ -170,45 +147,15 @@ function! s:callback_handlers_on_exit(job, exit_status, data) endfunction " on_stdout is the stdout handler for jobstart(). It collects the output of -" stderr and stores them to the jobs internal stdout list. -function! s:on_stdout(job_id, data) +" stderr and stores them to the jobs internal stdout list. +function! s:on_stdout(job_id, data) dict abort call extend(self.stdout, a:data) endfunction " on_stderr is the stderr handler for jobstart(). It collects the output of " stderr and stores them to the jobs internal stderr list. -function! s:on_stderr(job_id, data) +function! s:on_stderr(job_id, data) dict abort call extend(self.stderr, a:data) endfunction -" abort_all aborts all current jobs created with s:spawn() -function! s:abort_all() - if empty(s:jobs) - return - endif - - for id in keys(s:jobs) - if id > 0 - silent! call jobstop(id) - endif - endfor - - let s:jobs = {} -endfunction - -" abort aborts the job with the given name, where name is the first argument -" passed to s:spawn() -function! s:abort(path) - if empty(s:jobs) - return - endif - - for job in values(s:jobs) - if job.importpath == path && job.id > 0 - silent! call jobstop(job.id) - unlet s:jobs['job.id'] - endif - endfor -endfunction - " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/autoload/go/lint.vim b/sources_non_forked/vim-go/autoload/go/lint.vim index 9b2a543a..d81072a1 100644 --- a/sources_non_forked/vim-go/autoload/go/lint.vim +++ b/sources_non_forked/vim-go/autoload/go/lint.vim @@ -29,37 +29,42 @@ function! go#lint#Gometa(autosave, ...) abort let goargs = go#util#Shelljoin(a:000) endif - let meta_command = "gometalinter --disable-all" + let bin_path = go#path#CheckBinPath("gometalinter") + if empty(bin_path) + return + endif + + let cmd = [bin_path] + let cmd += ["--disable-all"] + if a:autosave || empty(g:go_metalinter_command) - let bin_path = go#path#CheckBinPath("gometalinter") - if empty(bin_path) - return - endif - - if a:autosave - " include only messages for the active buffer - let meta_command .= " --include='^" . expand('%:p') . ".*$'" - endif - " linters let linters = a:autosave ? g:go_metalinter_autosave_enabled : g:go_metalinter_enabled for linter in linters - let meta_command .= " --enable=".linter + let cmd += ["--enable=".linter] endfor - " deadline - let meta_command .= " --deadline=" . g:go_metalinter_deadline - " path - let meta_command .= " " . goargs + let cmd += [expand('%:p:h')] else " the user wants something else, let us use it. - let meta_command = g:go_metalinter_command + let cmd += [split(g:go_metalinter_command, " ")] endif - " comment out the following two lines for debugging - " echo meta_command - " return + if go#util#has_job() && has('lambda') + call s:lint_job({'cmd': cmd}) + return + endif + + " we add deadline only for sync mode + let cmd += ["--deadline=" . g:go_metalinter_deadline] + if a:autosave + " include only messages for the active buffer + let cmd += ["--include='^" . expand('%:p') . ".*$'"] + endif + + + let meta_command = join(cmd, " ") let out = go#tool#ExecuteInDir(meta_command) @@ -77,7 +82,7 @@ function! go#lint#Gometa(autosave, ...) abort let errformat = "%f:%l:%c:%t%*[^:]:\ %m,%f:%l::%t%*[^:]:\ %m" " Parse and populate our location list - call go#list#ParseFormat(l:listtype, errformat, split(out, "\n")) + call go#list#ParseFormat(l:listtype, errformat, split(out, "\n"), 'GoMetaLinter') let errors = go#list#Get(l:listtype) call go#list#Window(l:listtype, len(errors)) @@ -117,7 +122,7 @@ endfunction " Vet calls 'go vet' on the current directory. Any warnings are populated in " the location list -function! go#lint#Vet(bang, ...) +function! go#lint#Vet(bang, ...) abort call go#cmd#autowrite() echon "vim-go: " | echohl Identifier | echon "calling vet..." | echohl None if a:0 == 0 @@ -129,7 +134,7 @@ function! go#lint#Vet(bang, ...) let l:listtype = "quickfix" if go#util#ShellError() != 0 let errors = go#tool#ParseErrors(split(out, '\n')) - call go#list#Populate(l:listtype, errors) + call go#list#Populate(l:listtype, errors, 'Vet') call go#list#Window(l:listtype, len(errors)) if !empty(errors) && !a:bang call go#list#JumpToFirst(l:listtype) @@ -171,7 +176,7 @@ function! go#lint#Errcheck(...) abort let errformat = "%f:%l:%c:\ %m, %f:%l:%c\ %#%m" " Parse and populate our location list - call go#list#ParseFormat(l:listtype, errformat, split(out, "\n")) + call go#list#ParseFormat(l:listtype, errformat, split(out, "\n"), 'Errcheck') let errors = go#list#Get(l:listtype) @@ -182,7 +187,7 @@ function! go#lint#Errcheck(...) abort endif if !empty(errors) - call go#list#Populate(l:listtype, errors) + call go#list#Populate(l:listtype, errors, 'Errcheck') call go#list#Window(l:listtype, len(errors)) if !empty(errors) call go#list#JumpToFirst(l:listtype) @@ -196,7 +201,7 @@ function! go#lint#Errcheck(...) abort endfunction -function! go#lint#ToggleMetaLinterAutoSave() +function! go#lint#ToggleMetaLinterAutoSave() abort if get(g:, "go_metalinter_autosave", 0) let g:go_metalinter_autosave = 0 call go#util#EchoProgress("auto metalinter disabled") @@ -207,4 +212,88 @@ function! go#lint#ToggleMetaLinterAutoSave() call go#util#EchoProgress("auto metalinter enabled") endfunction +function s:lint_job(args) + let status_dir = expand('%:p:h') + let started_at = reltime() + + call go#statusline#Update(status_dir, { + \ 'desc': "current status", + \ 'type': "gometalinter", + \ 'state': "analysing", + \}) + + " autowrite is not enabled for jobs + call go#cmd#autowrite() + + let l:listtype = go#list#Type("quickfix") + let l:errformat = '%f:%l:%c:%t%*[^:]:\ %m,%f:%l::%t%*[^:]:\ %m' + + function! s:callback(chan, msg) closure + let old_errorformat = &errorformat + let &errorformat = l:errformat + caddexpr a:msg + let &errorformat = old_errorformat + + " TODO(arslan): cursor still jumps to first error even If I don't want + " it. Seems like there is a regression somewhere, but not sure where. + copen + endfunction + + function! s:close_cb(chan) closure + let l:job = ch_getjob(a:chan) + let l:status = job_status(l:job) + + let exitval = 1 + if l:status == "dead" + let l:info = job_info(l:job) + let exitval = l:info.exitval + endif + + let status = { + \ 'desc': 'last status', + \ 'type': "gometaliner", + \ 'state': "finished", + \ } + + if exitval + let status.state = "failed" + endif + + let elapsed_time = reltimestr(reltime(started_at)) + " strip whitespace + let elapsed_time = substitute(elapsed_time, '^\s*\(.\{-}\)\s*$', '\1', '') + let status.state .= printf(" (%ss)", elapsed_time) + + call go#statusline#Update(status_dir, status) + + let errors = go#list#Get(l:listtype) + if empty(errors) + call go#list#Window(l:listtype, len(errors)) + elseif has("patch-7.4.2200") + if l:listtype == 'quickfix' + call setqflist([], 'a', {'title': 'GoMetaLinter'}) + else + call setloclist(0, [], 'a', {'title': 'GoMetaLinter'}) + endif + endif + + if get(g:, 'go_echo_command_info', 1) + call go#util#EchoSuccess("linting finished") + endif + endfunction + + let start_options = { + \ 'callback': function("s:callback"), + \ 'close_cb': function("s:close_cb"), + \ } + + call job_start(a:args.cmd, start_options) + + call go#list#Clean(l:listtype) + + if get(g:, 'go_echo_command_info', 1) + call go#util#EchoProgress("linting started ...") + endif +endfunction + " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/autoload/go/list.vim b/sources_non_forked/vim-go/autoload/go/list.vim index 6859a9f3..56d6115d 100644 --- a/sources_non_forked/vim-go/autoload/go/list.vim +++ b/sources_non_forked/vim-go/autoload/go/list.vim @@ -5,7 +5,7 @@ endif " Window opens the list with the given height up to 10 lines maximum. " Otherwise g:go_loclist_height is used. If no or zero height is given it " closes the window -function! go#list#Window(listtype, ...) +function! go#list#Window(listtype, ...) abort let l:listtype = go#list#Type(a:listtype) " we don't use lwindow to close the location list as we need also the " ability to resize the window. So, we are going to use lopen and lclose @@ -40,7 +40,7 @@ endfunction " Get returns the current list of items from the location list -function! go#list#Get(listtype) +function! go#list#Get(listtype) abort let l:listtype = go#list#Type(a:listtype) if l:listtype == "locationlist" return getloclist(0) @@ -50,22 +50,27 @@ function! go#list#Get(listtype) endfunction " Populate populate the location list with the given items -function! go#list#Populate(listtype, items) +function! go#list#Populate(listtype, items, title) abort let l:listtype = go#list#Type(a:listtype) if l:listtype == "locationlist" call setloclist(0, a:items, 'r') + + " The last argument ({what}) is introduced with 7.4.2200: + " https://github.com/vim/vim/commit/d823fa910cca43fec3c31c030ee908a14c272640 + if has("patch-7.4.2200") | call setloclist(0, [], 'a', {'title': a:title}) | endif else call setqflist(a:items, 'r') + if has("patch-7.4.2200") | call setqflist([], 'a', {'title': a:title}) | endif endif endfunction -function! go#list#PopulateWin(winnr, items) +function! go#list#PopulateWin(winnr, items) abort call setloclist(a:winnr, a:items, 'r') endfunction " Parse parses the given items based on the specified errorformat nad " populates the location list. -function! go#list#ParseFormat(listtype, errformat, items) +function! go#list#ParseFormat(listtype, errformat, items, title) abort let l:listtype = go#list#Type(a:listtype) " backup users errorformat, will be restored once we are finished let old_errorformat = &errorformat @@ -74,8 +79,10 @@ function! go#list#ParseFormat(listtype, errformat, items) let &errorformat = a:errformat if l:listtype == "locationlist" lgetexpr a:items + if has("patch-7.4.2200") | call setloclist(0, [], 'a', {'title': a:title}) | endif else cgetexpr a:items + if has("patch-7.4.2200") | call setqflist([], 'a', {'title': a:title}) | endif endif "restore back @@ -84,7 +91,7 @@ endfunction " Parse parses the given items based on the global errorformat and " populates the location list. -function! go#list#Parse(listtype, items) +function! go#list#Parse(listtype, items) abort let l:listtype = go#list#Type(a:listtype) if l:listtype == "locationlist" lgetexpr a:items @@ -94,7 +101,7 @@ function! go#list#Parse(listtype, items) endfunction " JumpToFirst jumps to the first item in the location list -function! go#list#JumpToFirst(listtype) +function! go#list#JumpToFirst(listtype) abort let l:listtype = go#list#Type(a:listtype) if l:listtype == "locationlist" ll 1 @@ -104,7 +111,7 @@ function! go#list#JumpToFirst(listtype) endfunction " Clean cleans the location list -function! go#list#Clean(listtype) +function! go#list#Clean(listtype) abort let l:listtype = go#list#Type(a:listtype) if l:listtype == "locationlist" lex [] @@ -113,7 +120,7 @@ function! go#list#Clean(listtype) endif endfunction -function! go#list#Type(listtype) +function! go#list#Type(listtype) abort if g:go_list_type == "locationlist" return "locationlist" elseif g:go_list_type == "quickfix" diff --git a/sources_non_forked/vim-go/autoload/go/package.vim b/sources_non_forked/vim-go/autoload/go/package.vim index e6f194ae..b12c7b71 100644 --- a/sources_non_forked/vim-go/autoload/go/package.vim +++ b/sources_non_forked/vim-go/autoload/go/package.vim @@ -28,7 +28,7 @@ if len(s:goarch) == 0 endif endif -function! go#package#Paths() +function! go#package#Paths() abort let dirs = [] if !exists("s:goroot") @@ -54,7 +54,7 @@ function! go#package#Paths() return dirs endfunction -function! go#package#ImportPath(arg) +function! go#package#ImportPath(arg) abort let path = fnamemodify(resolve(a:arg), ':p') let dirs = go#package#Paths() @@ -77,7 +77,7 @@ function! go#package#ImportPath(arg) endif endfunction -function! go#package#FromPath(arg) +function! go#package#FromPath(arg) abort let path = fnamemodify(resolve(a:arg), ':p') let dirs = go#package#Paths() @@ -99,7 +99,7 @@ function! go#package#FromPath(arg) endif endfunction -function! go#package#CompleteMembers(package, member) +function! go#package#CompleteMembers(package, member) abort silent! let content = go#util#System('godoc ' . a:package) if go#util#ShellError() || !len(content) return [] @@ -118,7 +118,7 @@ function! go#package#CompleteMembers(package, member) endtry endfunction -function! go#package#Complete(ArgLead, CmdLine, CursorPos) +function! go#package#Complete(ArgLead, CmdLine, CursorPos) abort let words = split(a:CmdLine, '\s\+', 1) " do not complete package members for these commands diff --git a/sources_non_forked/vim-go/autoload/go/path.vim b/sources_non_forked/vim-go/autoload/go/path.vim index 75c46616..a9b74e97 100644 --- a/sources_non_forked/vim-go/autoload/go/path.vim +++ b/sources_non_forked/vim-go/autoload/go/path.vim @@ -8,7 +8,7 @@ let s:initial_go_path = "" " echoes the current GOPATH, if an argument is passed it replaces the current " GOPATH with it. If two double quotes are passed (the empty string in go), " it'll clear the GOPATH and will restore to the initial GOPATH. -function! go#path#GoPath(...) +function! go#path#GoPath(...) abort " we have an argument, replace GOPATH if len(a:000) " clears the current manually set GOPATH and restores it to the @@ -35,7 +35,7 @@ endfunction " Default returns the default GOPATH. If there is a single GOPATH it returns " it. For multiple GOPATHS separated with a the OS specific separator, only " the first one is returned -function! go#path#Default() +function! go#path#Default() abort let go_paths = split($GOPATH, go#util#PathListSep()) if len(go_paths) == 1 @@ -47,7 +47,7 @@ endfunction " HasPath checks whether the given path exists in GOPATH environment variable " or not -function! go#path#HasPath(path) +function! go#path#HasPath(path) abort let go_paths = split($GOPATH, go#util#PathListSep()) let last_char = strlen(a:path) - 1 @@ -69,7 +69,7 @@ endfunction " Godeps, GB, it will modify the GOPATH so those directories take precedence " over the current GOPATH. It also detects diretories whose are outside " GOPATH. -function! go#path#Detect() +function! go#path#Detect() abort let gopath = $GOPATH " don't lookup for godeps if autodetect is disabled. @@ -115,7 +115,7 @@ endfunction " BinPath returns the binary path of installed go tools. -function! go#path#BinPath() +function! go#path#BinPath() abort let bin_path = "" " check if our global custom path is set, if not check if $GOBIN is set so @@ -135,7 +135,7 @@ endfunction " CheckBinPath checks whether the given binary exists or not and returns the " path of the binary. It returns an empty string doesn't exists. -function! go#path#CheckBinPath(binpath) +function! go#path#CheckBinPath(binpath) abort " remove whitespaces if user applied something like 'goimports ' let binpath = substitute(a:binpath, '^\s*\(.\{-}\)\s*$', '\1', '') " save off original path @@ -161,7 +161,7 @@ function! go#path#CheckBinPath(binpath) " just get the basename let basename = fnamemodify(binpath, ":t") if !executable(basename) - echo "vim-go: could not find '" . basename . "'. Run :GoInstallBinaries to fix it." + echom "vim-go: could not find '" . basename . "'. Run :GoInstallBinaries to fix it." " restore back! let $PATH = old_path return "" diff --git a/sources_non_forked/vim-go/autoload/go/play.vim b/sources_non_forked/vim-go/autoload/go/play.vim index 44cf3eca..ac5bba42 100644 --- a/sources_non_forked/vim-go/autoload/go/play.vim +++ b/sources_non_forked/vim-go/autoload/go/play.vim @@ -3,7 +3,7 @@ if !exists("g:go_play_open_browser") endif -function! go#play#Share(count, line1, line2) +function! go#play#Share(count, line1, line2) abort if !executable('curl') echohl ErrorMsg | echomsg "vim-go: require 'curl' command" | echohl None return @@ -42,7 +42,7 @@ function! go#play#Share(count, line1, line2) endfunction -function! s:get_visual_content() +function! s:get_visual_content() abort let save_regcont = @" let save_regtype = getregtype('"') silent! normal! gvy @@ -55,7 +55,7 @@ endfunction " http://stackoverflow.com/questions/1533565/how-to-get-visually-selected-text-in-vimscript " another function that returns the content of visual selection, it's not used " but might be useful in the future -function! s:get_visual_selection() +function! s:get_visual_selection() abort let [lnum1, col1] = getpos("'<")[1:2] let [lnum2, col2] = getpos("'>")[1:2] @@ -72,7 +72,7 @@ endfunction " following two functions are from: https://github.com/mattn/gist-vim " thanks @mattn -function! s:get_browser_command() +function! s:get_browser_command() abort let go_play_browser_command = get(g:, 'go_play_browser_command', '') if go_play_browser_command == '' if has('win32') || has('win64') diff --git a/sources_non_forked/vim-go/autoload/go/rename.vim b/sources_non_forked/vim-go/autoload/go/rename.vim index d65256c5..df8047e1 100644 --- a/sources_non_forked/vim-go/autoload/go/rename.vim +++ b/sources_non_forked/vim-go/autoload/go/rename.vim @@ -6,22 +6,22 @@ if !exists("g:go_gorename_prefill") let g:go_gorename_prefill = 1 endif -function! go#rename#Rename(bang, ...) - let to = "" +function! go#rename#Rename(bang, ...) abort + let to_identifier = "" if a:0 == 0 let from = expand("") let ask = printf("vim-go: rename '%s' to: ", from) if g:go_gorename_prefill - let to = input(ask, from) + let to_identifier = input(ask, from) else - let to = input(ask) + let to_identifier = input(ask) endif redraw! - if empty(to) + if empty(to_identifier) return endif else - let to = a:1 + let to_identifier = a:1 endif "return with a warning if the bin doesn't exist @@ -32,10 +32,79 @@ function! go#rename#Rename(bang, ...) let fname = expand('%:p') let pos = go#util#OffsetCursor() - let cmd = printf('%s -offset %s -to %s', shellescape(bin_path), shellescape(printf('%s:#%d', fname, pos)), shellescape(to)) + let offset = printf('%s:#%d', fname, pos) - let out = go#tool#ExecuteInDir(cmd) + " no need to escape for job call + let bin_path = go#util#has_job() ? bin_path : shellescape(bin_path) + let offset = go#util#has_job() ? offset : shellescape(offset) + let to_identifier = go#util#has_job() ? to_identifier : shellescape(to_identifier) + let cmd = [bin_path, "-offset", offset, "-to", to_identifier] + + if go#util#has_job() + call go#util#EchoProgress(printf("renaming to '%s' ...", to_identifier)) + call s:rename_job({ + \ 'cmd': cmd, + \ 'bang': a:bang, + \}) + return + endif + + let command = join(cmd, " ") + let out = go#tool#ExecuteInDir(command) + + let splitted = split(out, '\n') + call s:parse_errors(go#util#ShellError(), a:bang, splitted) +endfunction + +function s:rename_job(args) + let messages = [] + function! s:callback(chan, msg) closure + call add(messages, a:msg) + endfunction + + let status_dir = expand('%:p:h') + + function! s:close_cb(chan) closure + let l:job = ch_getjob(a:chan) + let l:info = job_info(l:job) + + let status = { + \ 'desc': 'last status', + \ 'type': "gorename", + \ 'state': "finished", + \ } + + if l:info.exitval + let status.state = "failed" + endif + + call go#statusline#Update(status_dir, status) + + call s:parse_errors(l:info.exitval, a:args.bang, messages) + endfunction + + let start_options = { + \ 'callback': function("s:callback"), + \ 'close_cb': function("s:close_cb"), + \ } + + " modify GOPATH if needed + let old_gopath = $GOPATH + let $GOPATH = go#path#Detect() + + call go#statusline#Update(status_dir, { + \ 'desc': "current status", + \ 'type': "gorename", + \ 'state': "started", + \}) + + call job_start(a:args.cmd, start_options) + + let $GOPATH = old_gopath +endfunction + +function s:parse_errors(exit_val, bang, out) " reload all files to reflect the new changes. We explicitly call " checktime to trigger a reload of all files. See " http://www.mail-archive.com/vim@vim.org/msg05900.html for more info @@ -45,28 +114,28 @@ function! go#rename#Rename(bang, ...) silent! checktime let &autoread = current_autoread - " strip out newline on the end that gorename puts. If we don't remove, it - " will trigger the 'Hit ENTER to continue' prompt - let clean = split(out, '\n') - let l:listtype = "quickfix" - if go#util#ShellError() != 0 - let errors = go#tool#ParseErrors(split(out, '\n')) - call go#list#Populate(l:listtype, errors) + if a:exit_val != 0 + call go#util#EchoError("FAILED") + let errors = go#tool#ParseErrors(a:out) + call go#list#Populate(l:listtype, errors, 'Rename') call go#list#Window(l:listtype, len(errors)) if !empty(errors) && !a:bang call go#list#JumpToFirst(l:listtype) elseif empty(errors) " failed to parse errors, output the original content - call go#util#EchoError(out) + call go#util#EchoError(join(a:out, "")) endif + return - else - call go#list#Clean(l:listtype) - call go#list#Window(l:listtype) - redraw | echon "vim-go: " | echohl Function | echon clean[0] | echohl None endif + " strip out newline on the end that gorename puts. If we don't remove, it + " will trigger the 'Hit ENTER to continue' prompt + call go#list#Clean(l:listtype) + call go#list#Window(l:listtype) + call go#util#EchoSuccess(a:out[0]) + " refresh the buffer so we can see the new content " TODO(arslan): also find all other buffers and refresh them too. For this " we need a way to get the list of changes from gorename upon an success diff --git a/sources_non_forked/vim-go/autoload/go/statusline.vim b/sources_non_forked/vim-go/autoload/go/statusline.vim new file mode 100644 index 00000000..c832797c --- /dev/null +++ b/sources_non_forked/vim-go/autoload/go/statusline.vim @@ -0,0 +1,112 @@ +" Statusline +"""""""""""""""""""""""""""""""" + +" s:statuses is a global reference to all statuses. It stores the statuses per +" import paths (map[string]status), where each status is unique per its +" type. Current status dict is in form: +" { +" 'desc' : 'Job description', +" 'state' : 'Job state, such as success, failure, etc..', +" 'type' : 'Job type, such as build, test, etc..' +" 'created_at' : 'Time it was created as seconds since 1st Jan 1970' +" } +let s:statuses = {} + +" timer_id for cleaner +let s:timer_id = 0 + +" last_status stores the last generated text per status +let s:last_status = "" + +" Show returns the current status of the job for 20 seconds (configurable). It +" displays it in form of 'desc: [type|state]' if there is any state available, +" if not it returns an empty string. This function should be plugged directly +" into the statusline. +function! go#statusline#Show() abort + " lazy initialiation of the cleaner + if !s:timer_id + " clean every 60 seconds all statuses + let interval = get(g:, 'go_statusline_duration', 60000) + let s:timer_id = timer_start(interval, function('go#statusline#Clear'), {'repeat': -1}) + endif + + " nothing to show + if empty(s:statuses) + return '' + endif + + let status_dir = expand('%:p:h') + + if !has_key(s:statuses, status_dir) + return '' + endif + + let status = s:statuses[status_dir] + if !has_key(status, 'desc') || !has_key(status, 'state') || !has_key(status, 'type') + return '' + endif + + let status_text = printf("[%s|%s]", status.type, status.state) + if empty(status_text) + return '' + endif + + " only update highlight if status has changed. + if status_text != s:last_status + if status.state =~ "success" || status.state =~ "finished" + hi goStatusLineColor cterm=bold ctermbg=76 ctermfg=22 + elseif status.state =~ "started" || status.state =~ "analysing" + hi goStatusLineColor cterm=bold ctermbg=208 ctermfg=88 + elseif status.state =~ "failed" + hi goStatusLineColor cterm=bold ctermbg=196 ctermfg=52 + endif + endif + + let s:last_status = status_text + return status_text +endfunction + +" Update updates (adds) the statusline for the given status_dir with the +" given status dict. It overrides any previously set status. +function! go#statusline#Update(status_dir, status) abort + let a:status.created_at = reltime() + let s:statuses[a:status_dir] = a:status + + " force to update the statusline, otherwise the user needs to move the + " cursor + exe 'let &ro = &ro' + + " before we stop the timer, check if we have any previous jobs to be cleaned + " up. Otherwise every job will reset the timer when this function is called + " and thus old jobs will never be cleaned + call go#statusline#Clear(0) + + " also reset the timer, so the user has time to see it in the statusline. + " Setting the timer_id to 0 will trigger a new cleaner routine. + call timer_stop(s:timer_id) + let s:timer_id = 0 +endfunction + +" Clear clears all currently stored statusline data. The timer_id argument is +" just a placeholder so we can pass it to a timer_start() function if needed. +function! go#statusline#Clear(timer_id) abort + for [status_dir, status] in items(s:statuses) + let elapsed_time = reltimestr(reltime(status.created_at)) + " strip whitespace + let elapsed_time = substitute(elapsed_time, '^\s*\(.\{-}\)\s*$', '\1', '') + + if str2nr(elapsed_time) > 10 + call remove(s:statuses, status_dir) + endif + endfor + + if len(s:statuses) == 0 + let s:statuses = {} + endif + + " force to update the statusline, otherwise the user needs to move the + " cursor + exe 'let &ro = &ro' +endfunction + +" vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/autoload/go/template.vim b/sources_non_forked/vim-go/autoload/go/template.vim index 4b9e2713..0a92988f 100644 --- a/sources_non_forked/vim-go/autoload/go/template.vim +++ b/sources_non_forked/vim-go/autoload/go/template.vim @@ -1,6 +1,7 @@ let s:current_file = expand("") -function! go#template#create() +function! go#template#create() abort + let l:go_template_use_pkg = get(g:, 'go_template_use_pkg', 0) let l:root_dir = fnamemodify(s:current_file, ':h:h:h') let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' @@ -10,12 +11,19 @@ function! go#template#create() let l:package_name = go#tool#PackageName() " if we can't figure out any package name(no Go files or non Go package - " files) from the directory create the template - if l:package_name == -1 + " files) from the directory create the template or use the cwd + " as the name + if l:package_name == -1 && l:go_template_use_pkg != 1 let l:template_file = get(g:, 'go_template_file', "hello_world.go") let l:template_path = go#util#Join(l:root_dir, "templates", l:template_file) exe '0r ' . fnameescape(l:template_path) $delete _ + elseif l:package_name == -1 && l:go_template_use_pkg == 1 + " cwd is now the dir of the package + let l:path = fnamemodify(getcwd(), ':t') + let l:content = printf("package %s", l:path) + call append(0, l:content) + $delete _ else let l:content = printf("package %s", l:package_name) call append(0, l:content) @@ -28,7 +36,7 @@ function! go#template#create() execute cd . fnameescape(dir) endfunction -function! go#template#ToggleAutoCreate() +function! go#template#ToggleAutoCreate() abort if get(g:, "go_template_autocreate", 1) let g:go_template_autocreate = 0 call go#util#EchoProgress("auto template create disabled") diff --git a/sources_non_forked/vim-go/autoload/go/term.vim b/sources_non_forked/vim-go/autoload/go/term.vim index 08947fa9..9404ca9e 100644 --- a/sources_non_forked/vim-go/autoload/go/term.vim +++ b/sources_non_forked/vim-go/autoload/go/term.vim @@ -7,12 +7,12 @@ let s:jobs = {} " new creates a new terminal with the given command. Mode is set based on the " global variable g:go_term_mode, which is by default set to :vsplit -function! go#term#new(bang, cmd) +function! go#term#new(bang, cmd) abort return go#term#newmode(a:bang, a:cmd, g:go_term_mode) endfunction " new creates a new terminal with the given command and window mode. -function! go#term#newmode(bang, cmd, mode) +function! go#term#newmode(bang, cmd, mode) abort let mode = a:mode if empty(mode) let mode = g:go_term_mode @@ -36,7 +36,7 @@ function! go#term#newmode(bang, cmd, mode) setlocal noswapfile setlocal nobuflisted - let job = { + let job = { \ 'stderr' : [], \ 'stdout' : [], \ 'bang' : a:bang, @@ -53,6 +53,7 @@ function! go#term#newmode(bang, cmd, mode) let $GOPATH = old_gopath let job.id = id + let job.cmd = a:cmd startinsert " resize new term if needed. @@ -74,7 +75,7 @@ function! go#term#newmode(bang, cmd, mode) return id endfunction -function! s:on_stdout(job_id, data) +function! s:on_stdout(job_id, data, event) dict abort if !has_key(s:jobs, a:job_id) return endif @@ -83,7 +84,7 @@ function! s:on_stdout(job_id, data) call extend(job.stdout, a:data) endfunction -function! s:on_stderr(job_id, data) +function! s:on_stderr(job_id, data, event) dict abort if !has_key(s:jobs, a:job_id) return endif @@ -92,7 +93,7 @@ function! s:on_stderr(job_id, data) call extend(job.stderr, a:data) endfunction -function! s:on_exit(job_id, exit_status) +function! s:on_exit(job_id, exit_status, event) dict abort if !has_key(s:jobs, a:job_id) return endif @@ -113,9 +114,9 @@ function! s:on_exit(job_id, exit_status) if !empty(errors) " close terminal we don't need it anymore - close + close - call go#list#Populate(l:listtype, errors) + call go#list#Populate(l:listtype, errors, job.cmd) call go#list#Window(l:listtype, len(errors)) if !self.bang call go#list#JumpToFirst(l:listtype) diff --git a/sources_non_forked/vim-go/autoload/go/textobj.vim b/sources_non_forked/vim-go/autoload/go/textobj.vim index 53dfacd4..be0c7718 100644 --- a/sources_non_forked/vim-go/autoload/go/textobj.vim +++ b/sources_non_forked/vim-go/autoload/go/textobj.vim @@ -13,7 +13,7 @@ endif " < > " t for tag -function! go#textobj#Function(mode) +function! go#textobj#Function(mode) abort let offset = go#util#OffsetCursor() let fname = shellescape(expand("%:p")) @@ -84,7 +84,7 @@ function! go#textobj#Function(mode) call cursor(info.rbrace.line-1, 1) endfunction -function! go#textobj#FunctionJump(mode, direction) +function! go#textobj#FunctionJump(mode, direction) abort " get count of the motion. This should be done before all the normal " expressions below as those reset this value(because they have zero " count!). We abstract -1 because the index starts from 0 in motion. diff --git a/sources_non_forked/vim-go/autoload/go/tool.vim b/sources_non_forked/vim-go/autoload/go/tool.vim index c41bbd27..7b7e1af2 100644 --- a/sources_non_forked/vim-go/autoload/go/tool.vim +++ b/sources_non_forked/vim-go/autoload/go/tool.vim @@ -1,4 +1,4 @@ -function! go#tool#Files() +function! go#tool#Files() abort if go#util#IsWin() let format = '{{range $f := .GoFiles}}{{$.Dir}}\{{$f}}{{printf \"\n\"}}{{end}}{{range $f := .CgoFiles}}{{$.Dir}}\{{$f}}{{printf \"\n\"}}{{end}}' else @@ -9,7 +9,7 @@ function! go#tool#Files() return split(out, '\n') endfunction -function! go#tool#Deps() +function! go#tool#Deps() abort if go#util#IsWin() let format = '{{range $f := .Deps}}{{$f}}{{printf \"\n\"}}{{end}}' else @@ -20,7 +20,7 @@ function! go#tool#Deps() return split(out, '\n') endfunction -function! go#tool#Imports() +function! go#tool#Imports() abort let imports = {} if go#util#IsWin() let format = '{{range $f := .Imports}}{{$f}}{{printf \"\n\"}}{{end}}' @@ -43,7 +43,18 @@ function! go#tool#Imports() return imports endfunction -function! go#tool#PackageName() +function! go#tool#Info(auto) abort + let l:mode = get(g:, 'go_info_mode', 'gocode') + if l:mode == 'gocode' + call go#complete#Info(a:auto) + elseif l:mode == 'guru' + call go#guru#DescribeInfo() + else + call go#util#EchoError('go_info_mode value: '. l:mode .' is not valid. Valid values are: [gocode, guru]') + endif +endfunction + +function! go#tool#PackageName() abort let command = "go list -f \"{{.Name}}\"" let out = go#tool#ExecuteInDir(command) if go#util#ShellError() != 0 @@ -53,7 +64,7 @@ function! go#tool#PackageName() return split(out, '\n')[0] endfunction -function! go#tool#ParseErrors(lines) +function! go#tool#ParseErrors(lines) abort let errors = [] for line in a:lines @@ -85,7 +96,7 @@ endfunction "FilterValids filters the given items with only items that have a valid "filename. Any non valid filename is filtered out. -function! go#tool#FilterValids(items) +function! go#tool#FilterValids(items) abort " Remove any nonvalid filename from the location list to avoid opening an " empty buffer. See https://github.com/fatih/vim-go/issues/287 for " details. @@ -121,7 +132,9 @@ endfunction function! go#tool#ExecuteInDir(cmd) abort let old_gopath = $GOPATH + let old_goroot = $GOROOT let $GOPATH = go#path#Detect() + let $GOROOT = go#util#env("goroot") let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' let dir = getcwd() @@ -132,13 +145,14 @@ function! go#tool#ExecuteInDir(cmd) abort execute cd . fnameescape(dir) endtry + let $GOROOT = old_goroot let $GOPATH = old_gopath return out endfunction " Exists checks whether the given importpath exists or not. It returns 0 if " the importpath exists under GOPATH. -function! go#tool#Exists(importpath) +function! go#tool#Exists(importpath) abort let command = "go list ". a:importpath let out = go#tool#ExecuteInDir(command) @@ -152,7 +166,7 @@ endfunction " following two functions are from: https://github.com/mattn/gist-vim " thanks @mattn -function! s:get_browser_command() +function! s:get_browser_command() abort let go_play_browser_command = get(g:, 'go_play_browser_command', '') if go_play_browser_command == '' if go#util#IsWin() @@ -170,7 +184,7 @@ function! s:get_browser_command() return go_play_browser_command endfunction -function! go#tool#OpenBrowser(url) +function! go#tool#OpenBrowser(url) abort let cmd = s:get_browser_command() if len(cmd) == 0 redraw diff --git a/sources_non_forked/vim-go/autoload/go/ui.vim b/sources_non_forked/vim-go/autoload/go/ui.vim index ad8b517b..3f612576 100644 --- a/sources_non_forked/vim-go/autoload/go/ui.vim +++ b/sources_non_forked/vim-go/autoload/go/ui.vim @@ -1,7 +1,7 @@ let s:buf_nr = -1 "OpenWindow opens a new scratch window and put's the content into the window -function! go#ui#OpenWindow(title, content, filetype) +function! go#ui#OpenWindow(title, content, filetype) abort " Ensure there's only one return window in this session/tabpage call go#util#Windo("unlet! w:vim_go_return_window") " Mark the window we're leaving as such @@ -54,7 +54,7 @@ function! go#ui#OpenWindow(title, content, filetype) echon endfunction -function! go#ui#GetReturnWindow() +function! go#ui#GetReturnWindow() abort for l:wn in range(1, winnr("$")) if !empty(getwinvar(l:wn, "vim_go_return_window")) return l:wn @@ -63,7 +63,7 @@ function! go#ui#GetReturnWindow() endfunction " CloseWindow closes the current window -function! go#ui#CloseWindow() +function! go#ui#CloseWindow() abort " Close any window associated with the ui buffer, if it's there if bufexists(s:buf_nr) let ui_window_number = bufwinnr(s:buf_nr) @@ -82,7 +82,7 @@ endfunction " OpenDefinition parses the current line and jumps to it by openening a new " tab -function! go#ui#OpenDefinition(filter) +function! go#ui#OpenDefinition(filter) abort let curline = getline('.') " don't touch our first line or any blank line diff --git a/sources_non_forked/vim-go/autoload/go/util.vim b/sources_non_forked/vim-go/autoload/go/util.vim index 0251b14a..aaf7273d 100644 --- a/sources_non_forked/vim-go/autoload/go/util.vim +++ b/sources_non_forked/vim-go/autoload/go/util.vim @@ -1,5 +1,5 @@ " PathSep returns the appropriate OS specific path separator. -function! go#util#PathSep() +function! go#util#PathSep() abort if go#util#IsWin() return '\' endif @@ -7,7 +7,7 @@ function! go#util#PathSep() endfunction " PathListSep returns the appropriate OS specific path list separator. -function! go#util#PathListSep() +function! go#util#PathListSep() abort if go#util#IsWin() return ";" endif @@ -15,7 +15,7 @@ function! go#util#PathListSep() endfunction " LineEnding returns the correct line ending, based on the current fileformat -function! go#util#LineEnding() +function! go#util#LineEnding() abort if &fileformat == 'dos' return "\r\n" elseif &fileformat == 'mac' @@ -27,12 +27,12 @@ endfunction " Join joins any number of path elements into a single path, adding a " Separator if necessary and returns the result -function! go#util#Join(...) +function! go#util#Join(...) abort return join(a:000, go#util#PathSep()) endfunction " IsWin returns 1 if current OS is Windows or 0 otherwise -function! go#util#IsWin() +function! go#util#IsWin() abort let win = ['win16', 'win32', 'win64', 'win95'] for w in win if (has(w)) @@ -43,81 +43,80 @@ function! go#util#IsWin() return 0 endfunction -function! go#util#goarch() +function! go#util#has_job() abort + " job was introduced in 7.4.xxx however there are multiple bug fixes and one + " of the latest is 8.0.0087 which is required for a stable async API. + return has('job') && has("patch-8.0.0087") +endfunction + +let s:env_cache = {} + +" env returns the go environment variable for the given key. Where key can be +" GOARCH, GOOS, GOROOT, etc... It caches the result and returns the cached +" version. +function! go#util#env(key) abort + let l:key = tolower(a:key) + if has_key(s:env_cache, l:key) + return s:env_cache[l:key] + endif + + if executable('go') + let l:var = call('go#util#'.l:key, []) + if go#util#ShellError() != 0 + call go#util#EchoError(printf("'go env %s' failed", toupper(l:key))) + return '' + endif + else + let l:var = eval("$".toupper(a:key)) + endif + + let s:env_cache[l:key] = l:var + return l:var +endfunction + +function! go#util#goarch() abort return substitute(go#util#System('go env GOARCH'), '\n', '', 'g') endfunction -function! go#util#goos() +function! go#util#goos() abort return substitute(go#util#System('go env GOOS'), '\n', '', 'g') endfunction -function! go#util#goroot() +function! go#util#goroot() abort return substitute(go#util#System('go env GOROOT'), '\n', '', 'g') endfunction -function! go#util#gopath() +function! go#util#gopath() abort return substitute(go#util#System('go env GOPATH'), '\n', '', 'g') endfunction -function! go#util#osarch() +function! go#util#osarch() abort return go#util#goos() . '_' . go#util#goarch() endfunction -"Check if has vimproc -function! s:has_vimproc() - if !exists('g:go#use_vimproc') - if go#util#IsWin() - try - call vimproc#version() - let exists_vimproc = 1 - catch - let exists_vimproc = 0 - endtry - else - let exists_vimproc = 0 - endif - - let g:go#use_vimproc = exists_vimproc - endif - - return g:go#use_vimproc -endfunction - -if s:has_vimproc() - let s:vim_system = get(g:, 'gocomplete#system_function', 'vimproc#system2') - let s:vim_shell_error = get(g:, 'gocomplete#shell_error_function', 'vimproc#get_last_status') -else - let s:vim_system = get(g:, 'gocomplete#system_function', 'system') - let s:vim_shell_error = '' -endif - " System runs a shell command. It will reset the shell to /bin/sh for Unix-like " systems if it is executable. -function! go#util#System(str, ...) +function! go#util#System(str, ...) abort let l:shell = &shell if !go#util#IsWin() && executable('/bin/sh') let &shell = '/bin/sh' endif try - let l:output = call(s:vim_system, [a:str] + a:000) + let l:output = call('system', [a:str] + a:000) return l:output finally let &shell = l:shell endtry endfunction -function! go#util#ShellError() - if empty(s:vim_shell_error) - return v:shell_error - endif - return call(s:vim_shell_error, []) +function! go#util#ShellError() abort + return v:shell_error endfunction - " StripPath strips the path's last character if it's a path separator. " example: '/foo/bar/' -> '/foo/bar' -function! go#util#StripPathSep(path) +function! go#util#StripPathSep(path) abort let last_char = strlen(a:path) - 1 if a:path[last_char] == go#util#PathSep() return strpart(a:path, 0, last_char) @@ -128,13 +127,13 @@ endfunction " StripTrailingSlash strips the trailing slash from the given path list. " example: ['/foo/bar/'] -> ['/foo/bar'] -function! go#util#StripTrailingSlash(paths) +function! go#util#StripTrailingSlash(paths) abort return map(copy(a:paths), 'go#util#StripPathSep(v:val)') endfunction " Shelljoin returns a shell-safe string representation of arglist. The " {special} argument of shellescape() may optionally be passed. -function! go#util#Shelljoin(arglist, ...) +function! go#util#Shelljoin(arglist, ...) abort try let ssl_save = &shellslash set noshellslash @@ -149,9 +148,6 @@ function! go#util#Shelljoin(arglist, ...) endfunction fu! go#util#Shellescape(arg) - if s:has_vimproc() - return vimproc#shellescape(a:arg) - endif try let ssl_save = &shellslash set noshellslash @@ -163,7 +159,7 @@ endf " Shelllist returns a shell-safe representation of the items in the given " arglist. The {special} argument of shellescape() may optionally be passed. -function! go#util#Shelllist(arglist, ...) +function! go#util#Shelllist(arglist, ...) abort try let ssl_save = &shellslash set noshellslash @@ -177,7 +173,7 @@ function! go#util#Shelllist(arglist, ...) endfunction " Returns the byte offset for line and column -function! go#util#Offset(line, col) +function! go#util#Offset(line, col) abort if &encoding != 'utf-8' let sep = go#util#LineEnding() let buf = a:line == 1 ? '' : (join(getline(1, a:line-1), sep) . sep) @@ -188,13 +184,13 @@ function! go#util#Offset(line, col) endfunction " " Returns the byte offset for the cursor -function! go#util#OffsetCursor() +function! go#util#OffsetCursor() abort return go#util#Offset(line('.'), col('.')) endfunction " Windo is like the built-in :windo, only it returns to the window the command " was issued from -function! go#util#Windo(command) +function! go#util#Windo(command) abort let s:currentWindow = winnr() try execute "windo " . a:command @@ -206,7 +202,7 @@ endfunction " snippetcase converts the given word to given preferred snippet setting type " case. -function! go#util#snippetcase(word) +function! go#util#snippetcase(word) abort let l:snippet_case = get(g:, 'go_snippet_case_type', "snakecase") if l:snippet_case == "snakecase" return go#util#snakecase(a:word) @@ -219,7 +215,7 @@ endfunction " snakecase converts a string to snake case. i.e: FooBar -> foo_bar " Copied from tpope/vim-abolish -function! go#util#snakecase(word) +function! go#util#snakecase(word) abort let word = substitute(a:word,'::','/','g') let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g') let word = substitute(word,'\(\l\|\d\)\(\u\)','\1_\2','g') @@ -230,7 +226,7 @@ endfunction " camelcase converts a string to camel case. i.e: FooBar -> fooBar " Copied from tpope/vim-abolish -function! go#util#camelcase(word) +function! go#util#camelcase(word) abort let word = substitute(a:word, '-', '_', 'g') if word !~# '_' && word =~# '\l' return substitute(word,'^.','\l&','') @@ -239,7 +235,7 @@ function! go#util#camelcase(word) endif endfunction -function! go#util#AddTags(line1, line2, ...) +function! go#util#AddTags(line1, line2, ...) abort " default is json let l:keys = ["json"] if a:0 @@ -286,21 +282,27 @@ endfunction " TODO(arslan): I couldn't parameterize the highlight types. Check if we can " simplify the following functions - +" +" NOTE(arslan): echon doesn't work well with redraw, thus echo doesn't print +" even though we order it. However echom seems to be work fine. function! go#util#EchoSuccess(msg) - redraw | echon "vim-go: " | echohl Function | echon a:msg | echohl None + redraw | echohl Function | echom "vim-go: " . a:msg | echohl None endfunction function! go#util#EchoError(msg) - redraw | echon "vim-go: " | echohl ErrorMsg | echon a:msg | echohl None + redraw | echohl ErrorMsg | echom "vim-go: " . a:msg | echohl None endfunction function! go#util#EchoWarning(msg) - redraw | echon "vim-go: " | echohl WarningMsg | echon a:msg | echohl None + redraw | echohl WarningMsg | echom "vim-go: " . a:msg | echohl None endfunction function! go#util#EchoProgress(msg) - redraw | echon "vim-go: " | echohl Identifier | echon a:msg | echohl None + redraw | echohl Identifier | echom "vim-go: " . a:msg | echohl None +endfunction + +function! go#util#EchoInfo(msg) + redraw | echohl Debug | echom "vim-go: " . a:msg | echohl None endfunction " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/doc/vim-go.txt b/sources_non_forked/vim-go/doc/vim-go.txt index 19682c42..87c59118 100644 --- a/sources_non_forked/vim-go/doc/vim-go.txt +++ b/sources_non_forked/vim-go/doc/vim-go.txt @@ -327,7 +327,9 @@ CTRL-t :GoInfo Show type information about the identifier under the cursor. For example putting it above a function call is going to show the full function - signature. It uses gocode to get the type informations. + signature. By default it uses `gocode` to get the type informations. To + change the underlying tool from `gocode` to another tool, see + |g:go_info_mode|. *:GoInstall* @@ -786,6 +788,10 @@ annotation. Calls `goimports` for the current package + *(go-lint)* + +Calls `golint` for the current package + *(go-vet)* Calls `go vet` for the current package @@ -946,13 +952,17 @@ vim-go also defines the following text motion objects: ============================================================================== FUNCTIONS *go-functions* - *go#jobcontrol#Statusline()* + *go#statusline#Show()* Shows the status of a job running asynchronously. Can be used to plug into the statusline. It works to show the status per package instead of per file. Assume you have three files open, all belonging to the same package, if -the package build (`:GoBuild`) is successful, all statusline's will be empty -(means SUCCESS), if you it fails all file's statusline will show FAILED. +the package build (`:GoBuild`) is successful, all statusline's will show +`success`, if you it fails all file's statusline will show `failed`. + +To avoid always showing old status information, the status information is +cleaned for each package after `60` seconds. This can be changed with the +|g:go_statusline_duration| setting. *go#complete#GetInfo()* @@ -989,17 +999,35 @@ with |:GoPlay|. By default it's enabled. > Use this option to show the type info (|:GoInfo|) for the word under the cursor automatically. Whenever the cursor changes the type info will be -updated. By default it's disabled. +updated. By default it's disabled. The delay can be configured with the +'g:go_updatetime' setting. > let g:go_auto_type_info = 0 < + + *'g:go_info_mode'* + +Use this option to define the command to be used for |:GoInfo|. By default +`gocode` is being used as it's the fastest option. But one might also use +`guru` as it's covers more cases and is more accurate. Current valid options +are: `[gocode, guru]` > + + let g:go_info_mode = 'gocode' +< *'g:go_auto_sameids'* Use this option to highlight all uses of the identifier under the cursor (:GoSameIds) automatically. By default it's disabled. The delay can be -configured with the 'updatetime' setting. +configured with the 'g:go_updatetime' setting. > let g:go_auto_sameids = 0 +< + *'g:go_updatetime'* + +Use this option to configure the a custom 'updatetime' for Go source files. If +set to 0, no custom time will be configured. By default it's set to 800ms. +> + let g:go_updatetime = 800 < *'g:go_jump_to_error'* @@ -1078,14 +1106,6 @@ Use this option to jump to an existing buffer for the split, vsplit and tab mappings of |:GoDef|. By default it's disabled. > let g:go_def_reuse_buffer = 0 -< - *'g:go_dispatch_enabled'* - -Use this option to enable/disable the use of Dispatch to execute the `:GoRun`, -`:GoBuild` and `:GoGenerate` commands. More information about Dispatch is -available at https://github.com/tpope/vim-dispatch. Default is disabled. > - - let g:go_dispatch_enabled = 0 < *'g:go_doc_command'* @@ -1332,9 +1352,9 @@ appropriate kind of list for the command that was called. Supported values are < *'g:go_asmfmt_autosave'* -Use this option to auto |:AsmFmt| on save. By default it's enabled. > +Use this option to auto |:AsmFmt| on save. By default it's disabled. > - let g:go_asmfmt_autosave = 1 + let g:go_asmfmt_autosave = 0 < *'g:go_term_mode'* @@ -1396,6 +1416,14 @@ to an autocompletion proposals. By default it is enabled. > let g:go_gocode_propose_builtins = 1 < + *'g:go_gocode_unimported_packages'* + +Specifies whether `gocode` should include suggestions from unimported packages. +By default it is disabled. +> + let g:go_gocode_unimported_packages = 0 +< + *'g:go_gocode_socket_type'* Specifies whether `gocode` should use a different socket type. By default @@ -1414,6 +1442,9 @@ If the new file is created in an already prepopulated package (with other Go files), in this case a Go code template with only the Go package declaration (which is automatically determined according to the current package) is added. +To always use the package name instead of the template, enable the +|`g:go_template_use_pkg`| setting. + By default it is enabled. > let g:go_template_autocreate = 1 @@ -1425,15 +1456,45 @@ is created. Checkout |'g:go_template_autocreate'| for more info. By default the `hello_world.go` file is used. > let g:go_template_file = "hello_world.go" +< + *'g:go_template_use_pkg'* + +Specifies that, rather than using a template, the package name is used if a new +Go file is created. Checkout |'g:go_template_autocreate'| for more info. By +default the template file specified by |'g:go_template_file'| is used. + +> + let g:go_template_use_pkg = 0 < *'g:go_decls_includes'* - Only useful if `ctrlp.vim` is installed. This sets which declarations to - show for |:GoDecls|. - It is a Comma delimited list Possible options are: {func,type}. - The default is: > +Only useful if `ctrlp.vim` is installed. This sets which declarations to show +for |:GoDecls|. It is a Comma delimited list Possible options are: +{func,type}. The default is: > let g:go_decls_includes = 'func,type' +< + *'g:go_echo_command_info'* + +Echoes information about various Go commands, such as `:GoBuild`, `:GoTest`, +`:GoCoverage`, etc... Useful to disable if you use the statusline integration, +i.e: |go#statusline#Show()|. By default it's enabled +> + let g:go_echo_command_info = 1 +< + *'g:go_echo_go_info'* + +Use this option to show the identifier information when completion is done. By +default it's enabled > + + let g:go_echo_go_info = 1 +< + *'g:go_statusline_duration'* + +Specifices the duration of statusline information being showed per package. By +default it's 60 seconds. Must be in milliseconds. +> + let g:go_statusline_duration = 60000 < ============================================================================== TROUBLESHOOTING *go-troubleshooting* diff --git a/sources_non_forked/vim-go/ftplugin/go.vim b/sources_non_forked/vim-go/ftplugin/go.vim index dfe068f4..de830f9c 100644 --- a/sources_non_forked/vim-go/ftplugin/go.vim +++ b/sources_non_forked/vim-go/ftplugin/go.vim @@ -57,7 +57,75 @@ if get(g:, "go_textobj_enabled", 1) endif if get(g:, "go_auto_type_info", 0) || get(g:, "go_auto_sameids", 0) - setlocal updatetime=800 + let &l:updatetime= get(g:, "go_updatetime", 800) endif +" NOTE(arslan): experimental, disabled by default, doesn't work well. No +" documentation as well. If anyone feels adventerous, enable the following and +" try to search for Go identifiers ;) +" +" if get(g:, "go_sameid_search_enabled", 0) +" autocmd FileType go nnoremap * :call Sameids_search(0) +" autocmd FileType go nnoremap # :call Sameids_search(1) +" autocmd FileType go nnoremap n :call Sameids_repeat(0) +" autocmd FileType go nnoremap N :call Sameids_repeat(1) +" autocmd FileType go cabbrev nohlsearch =Sameids_nohlsearch() +" endif + +" " mode 0: next 1: prev +" function! Sameids_repeat(mode) +" let matches = getmatches() +" if empty(matches) +" return +" endif +" let cur_offset = go#util#OffsetCursor() + +" " reverse list to make it easy to find the prev occurence +" if a:mode +" call reverse(matches) +" endif + +" for m in matches +" if !has_key(m, "group") +" return +" endif + +" if m.group != "goSameId" +" return +" endif + +" let offset = go#util#Offset(m.pos1[0], m.pos1[1]) + +" if a:mode && cur_offset > offset +" call cursor(m.pos1[0], m.pos1[1]) +" return +" elseif !a:mode && cur_offset < offset +" call cursor(m.pos1[0], m.pos1[1]) +" return +" endif +" endfor + +" " reached start/end, jump to the end/start +" let initial_match = matches[0] +" if !has_key(initial_match, "group") +" return +" endif + +" if initial_match.group != "goSameId" +" return +" endif + +" call cursor(initial_match.pos1[0], initial_match.pos1[1]) +" endfunction + +" function! Sameids_search(mode) +" call go#guru#SameIds() +" call Sameids_repeat(a:mode) +" endfunction + +" function! Sameids_nohlsearch() +" call go#guru#ClearSameIds() +" return "nohlsearch" +" endfunction + " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/ftplugin/go/commands.vim b/sources_non_forked/vim-go/ftplugin/go/commands.vim index c54de24c..d8bff665 100644 --- a/sources_non_forked/vim-go/ftplugin/go/commands.vim +++ b/sources_non_forked/vim-go/ftplugin/go/commands.vim @@ -17,15 +17,15 @@ command! -nargs=? GoGuruTags call go#guru#Tags() command! -nargs=* -range GoAddTags call go#util#AddTags(, , ) -command! -range=% GoSameIds call go#guru#SameIds() +command! -range=0 GoSameIds call go#guru#SameIds() command! -range=0 GoSameIdsClear call go#guru#ClearSameIds() -command! -range=% GoSameIdsToggle call go#guru#ToggleSameIds() +command! -range=0 GoSameIdsToggle call go#guru#ToggleSameIds() command! -range=0 GoSameIdsAutoToggle call go#guru#AutoToogleSameIds() " -- tool command! -nargs=0 GoFiles echo go#tool#Files() command! -nargs=0 GoDeps echo go#tool#Deps() -command! -nargs=* GoInfo call go#complete#Info(0) +command! -nargs=* GoInfo call go#tool#Info(0) command! -nargs=0 GoAutoTypeInfoToggle call go#complete#ToggleAutoTypeInfo() " -- cmd diff --git a/sources_non_forked/vim-go/ftplugin/go/mappings.vim b/sources_non_forked/vim-go/ftplugin/go/mappings.vim index b798209d..e1bbe46e 100644 --- a/sources_non_forked/vim-go/ftplugin/go/mappings.vim +++ b/sources_non_forked/vim-go/ftplugin/go/mappings.vim @@ -31,7 +31,7 @@ nnoremap (go-coverage-browser) :call go#coverage#Browser(!g: nnoremap (go-files) :call go#tool#Files() nnoremap (go-deps) :call go#tool#Deps() -nnoremap (go-info) :call go#complete#Info(0) +nnoremap (go-info) :call go#tool#Info(0) nnoremap (go-import) :call go#import#SwitchImport(1, '', expand(''), '') nnoremap (go-imports) :call go#fmt#Format(1) @@ -43,9 +43,9 @@ nnoremap (go-callstack) :call go#guru#Callstack(-1) xnoremap (go-freevars) :call go#guru#Freevars(0) nnoremap (go-channelpeers) :call go#guru#ChannelPeers(-1) nnoremap (go-referrers) :call go#guru#Referrers(-1) -nnoremap (go-sameids) :call go#guru#SameIds(-1) +nnoremap (go-sameids) :call go#guru#SameIds() nnoremap (go-whicherrs) :call go#guru#Whicherrs(-1) -nnoremap (go-sameids-toggle) :call go#guru#ToggleSameIds(-1) +nnoremap (go-sameids-toggle) :call go#guru#ToggleSameIds() nnoremap (go-rename) :call go#rename#Rename(!g:go_jump_to_error) @@ -65,6 +65,7 @@ nnoremap (go-doc-split) :call go#doc#Open("new", "split") (go-doc-browser) :call go#doc#OpenBrowser() nnoremap (go-metalinter) :call go#lint#Gometa(0) +nnoremap (go-lint) :call go#lint#Golint() nnoremap (go-vet) :call go#lint#Vet(!g:go_jump_to_error) nnoremap (go-alternate-edit) :call go#alternate#Switch(0, "edit") diff --git a/sources_non_forked/vim-go/indent/gohtmltmpl.vim b/sources_non_forked/vim-go/indent/gohtmltmpl.vim index d95cbc24..864913df 100644 --- a/sources_non_forked/vim-go/indent/gohtmltmpl.vim +++ b/sources_non_forked/vim-go/indent/gohtmltmpl.vim @@ -30,13 +30,13 @@ function! GetGoHTMLTmplIndent(lnum) " If need to indent based on last line let last_line = getline(a:lnum-1) - if last_line =~ '^\s*{{\s*\%(if\|else\|range\|with\|define\|block\).*}}' + if last_line =~ '^\s*{{-\=\s*\%(if\|else\|range\|with\|define\|block\).*}}' let ind += sw endif " End of FuncMap block let current_line = getline(a:lnum) - if current_line =~ '^\s*{{\s*\%(else\|end\).*}}' + if current_line =~ '^\s*{{-\=\s*\%(else\|end\).*}}' let ind -= sw endif diff --git a/sources_non_forked/vim-go/plugin/go.vim b/sources_non_forked/vim-go/plugin/go.vim index 6c050083..3e2f6a1e 100644 --- a/sources_non_forked/vim-go/plugin/go.vim +++ b/sources_non_forked/vim-go/plugin/go.vim @@ -126,6 +126,10 @@ endfunction " ============================================================================ " function! s:echo_go_info() + if !get(g:, "go_echo_go_info", 1) + return + endif + if !exists('v:completed_item') || empty(v:completed_item) return endif @@ -145,14 +149,14 @@ endfunction function! s:auto_type_info() " GoInfo automatic update if get(g:, "go_auto_type_info", 0) - call go#complete#Info(1) + call go#tool#Info(1) endif endfunction function! s:auto_sameids() " GoSameId automatic update if get(g:, "go_auto_sameids", 0) - call go#guru#SameIds(-1) + call go#guru#SameIds() endif endfunction @@ -165,7 +169,7 @@ endfunction function! s:asmfmt_autosave() " Go asm formatting on save - if get(g:, "go_asmfmt_autosave", 1) + if get(g:, "go_asmfmt_autosave", 0) call go#asmfmt#Format() endif endfunction @@ -200,6 +204,10 @@ augroup vim-go autocmd BufWritePre *.s call s:asmfmt_autosave() autocmd BufWritePost *.go call s:metalinter_autosave() autocmd BufNewFile *.go call s:template_autocreate() + " clear SameIds when the buffer is unloaded so that loading another buffer + " in the same window doesn't highlight the most recently matched + " identifier's positions. + autocmd BufWinEnter *.go call go#guru#ClearSameIds() augroup END " vim: sw=2 ts=2 et diff --git a/sources_non_forked/vim-go/syntax/go.vim b/sources_non_forked/vim-go/syntax/go.vim index e7e61ff3..9b23eb6c 100644 --- a/sources_non_forked/vim-go/syntax/go.vim +++ b/sources_non_forked/vim-go/syntax/go.vim @@ -302,16 +302,18 @@ if g:go_highlight_functions != 0 syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl syn match goReceiverType /\w\+/ contained syn match goFunction /\w\+/ contained + syn match goFunctionCall /\w\+\ze(/ contains=GoBuiltins,goDeclaration else syn keyword goDeclaration func endif hi def link goFunction Function +hi def link goFunctionCall Type " Methods; if g:go_highlight_methods != 0 - syn match goMethod /\.\w\+\ze(/hs=s+1 + syn match goMethodCall /\.\w\+\ze(/hs=s+1 endif -hi def link goMethod Type +hi def link goMethodCall Type " Fields; if g:go_highlight_fields != 0 @@ -324,7 +326,7 @@ if g:go_highlight_types != 0 syn match goTypeConstructor /\<\w\+{/he=e-1 syn match goTypeDecl /\/ nextgroup=goTypeName skipwhite skipnl syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl - syn match goDeclType /\/ contained skipwhite skipnl + syn match goDeclType /\/ skipwhite skipnl hi def link goReceiverType Type else syn keyword goDeclType struct interface @@ -372,12 +374,7 @@ endif hi def link goCoverageNormalText Comment function! s:hi() - " :GoSameIds - if &background == 'dark' - hi def goSameId term=bold cterm=bold ctermbg=white ctermfg=black guibg=white guifg=black - else - hi def goSameId term=bold cterm=bold ctermbg=14 guibg=Cyan - endif + hi def link goSameId Search " :GoCoverage commands hi def goCoverageCovered ctermfg=green guifg=#A6E22E diff --git a/sources_non_forked/vim-pug/syntax/pug.vim b/sources_non_forked/vim-pug/syntax/pug.vim index ee712dbb..09e6b9b9 100644 --- a/sources_non_forked/vim-pug/syntax/pug.vim +++ b/sources_non_forked/vim-pug/syntax/pug.vim @@ -32,9 +32,10 @@ syn cluster pugTop contains=pugBegin,pugComment,pugHtmlComment,pugJavascript syn match pugBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=pugTag,pugClassChar,pugIdChar,pugPlainChar,pugJavascript,pugScriptConditional,pugScriptStatement,pugPipedText syn match pugTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@pugComponent syn cluster pugComponent contains=pugAttributes,pugIdChar,pugBlockExpansionChar,pugClassChar,pugPlainChar,pugJavascript,pugTagBlockChar,pugTagInlineText -syn match pugComment '\(\s\+\|^\)\/\/.*$' -syn region pugCommentBlock start="\z(\s\+\|^\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend -syn region pugHtmlConditionalComment start="" +syntax keyword pugCommentTodo contained TODO FIXME XXX TBD +syn match pugComment '\(\s\+\|^\)\/\/.*$' contains=pugCommentTodo +syn region pugCommentBlock start="\z(\s\+\|^\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" contains=pugCommentTodo keepend +syn region pugHtmlConditionalComment start="" contains=pugCommentTodo syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent syn match pugClassChar "\." contained nextgroup=pugClass syn match pugBlockExpansionChar ":\s\+" contained nextgroup=pugTag,pugClassChar,pugIdChar @@ -93,6 +94,7 @@ hi def link pugInterpolationDelimiter Delimiter hi def link pugInlineDelimiter Delimiter hi def link pugFilter PreProc hi def link pugDocType PreProc +hi def link pugCommentTodo Todo hi def link pugComment Comment hi def link pugCommentBlock Comment hi def link pugHtmlConditionalComment pugComment diff --git a/sources_non_forked/vim-snipmate/autoload/snipMate.vim b/sources_non_forked/vim-snipmate/autoload/snipMate.vim index 76cc6481..e3b4ca6d 100644 --- a/sources_non_forked/vim-snipmate/autoload/snipMate.vim +++ b/sources_non_forked/vim-snipmate/autoload/snipMate.vim @@ -28,13 +28,9 @@ function! snipMate#expandSnip(snip, version, col) abort let [snippet, b:snip_state.stops] = snipmate#parse#snippet(a:snip) " Build stop/mirror info let b:snip_state.stop_count = s:build_stops(snippet, b:snip_state.stops, lnum, col, indent) - let snipLines = map(copy(snippet), - \ 'snipMate#sniplist_str(v:val, b:snip_state.stops)') else let snippet = snipmate#legacy#process_snippet(a:snip) let [b:snip_state.stops, b:snip_state.stop_count] = snipmate#legacy#build_stops(snippet, lnum, col - indent, indent) - let snipLines = split(substitute(snippet, printf('%s\d\+\|%s{\d\+.\{-}}', - \ g:snipmate#legacy#sigil, g:snipmate#legacy#sigil), '', 'g'), "\n", 1) endif " Abort if the snippet is empty @@ -42,23 +38,7 @@ function! snipMate#expandSnip(snip, version, col) abort return '' endif - " Expand snippet onto current position - let afterCursor = strpart(line, col - 1) - " Keep text after the cursor - if afterCursor != "\t" && afterCursor != ' ' - let line = strpart(line, 0, col - 1) - let snipLines[-1] .= afterCursor - else - let afterCursor = '' - " For some reason the cursor needs to move one right after this - if line != '' && col == 1 && &ve != 'all' && &ve != 'onemore' - let col += 1 - endif - endif - - " Insert snippet with proper indentation - call setline(lnum, line . snipLines[0]) - call append(lnum, map(snipLines[1:], "empty(v:val) ? v:val : '" . strpart(line, 0, indent - 1) . "' . v:val")) + let col = s:insert_snippet_text(snippet, lnum, col, indent) " Open any folds snippet expands into if &foldenable @@ -77,6 +57,50 @@ function! snipMate#expandSnip(snip, version, col) abort return b:snip_state.set_stop(0) endfunction +function! s:insert_snippet_text(snippet, lnum, col, indent) + let line = getline(a:lnum) + let col = a:col + let snippet = type(a:snippet) == type([]) ? a:snippet : split(a:snippet, "\n", 1) + let lnum = a:lnum + + " Keep text after the cursor + let afterCursor = strpart(line, col - 1) + if afterCursor != "\t" && afterCursor != ' ' + let line = strpart(line, 0, col - 1) + else + let afterCursor = '' + " For some reason the cursor needs to move one right after this + if line != '' && col == 1 && &ve != 'all' && &ve != 'onemore' + let col += 1 + endif + endif + + call setline(lnum, '') + call append(lnum, repeat([''], len(snippet) - 1)) + + for item in snippet + let add = lnum == a:lnum ? line : strpart(line, 0, a:indent - 1) + + if !(empty(item) || (type(item) == type([]) && empty(item[0]))) + if type(item) == type([]) + call setline(lnum, add . + \ snipMate#sniplist_str(item, b:snip_state.stops)) + else + call setline(lnum, add . + \ substitute(item, printf('%s\d\+\|%s{\d\+.\{-}}', + \ g:snipmate#legacy#sigil, g:snipmate#legacy#sigil), + \ '', 'g')) + endif + endif + + let lnum += 1 + endfor + + call setline(lnum - 1, getline(lnum - 1) . afterCursor) + + return col +endfunction + function! snipMate#placeholder_str(num, stops) abort return snipMate#sniplist_str(a:stops[a:num].placeholder, a:stops) endfunction diff --git a/sources_non_forked/vim-snipmate/doc/snipMate.txt b/sources_non_forked/vim-snipmate/doc/SnipMate.txt similarity index 100% rename from sources_non_forked/vim-snipmate/doc/snipMate.txt rename to sources_non_forked/vim-snipmate/doc/SnipMate.txt diff --git a/sources_non_forked/vim-snippets/AUTHORS b/sources_non_forked/vim-snippets/AUTHORS new file mode 100644 index 00000000..907daef1 --- /dev/null +++ b/sources_non_forked/vim-snippets/AUTHORS @@ -0,0 +1,383 @@ +Authors +=============================================================================== + +Generated with "git log --oneline --pretty="%an" | sort | uniq > AUTHORS + +Aaron Broder +Adnan Zafar +afolmert +aisensiy +Alexander Ross +Alexandre de Oliveira +Alexey Shevchenko +Alex Tan +Allen.M +Alvin Chan +ALX-Liu-Xiao +Andrea Giardini +Andreas Krennmair +Andreas Steinel +Andrei Cristian Petcu +Andrej Radovic +Andre Walker +Andrey Paskal +Andy Waite +Angel Alonso +Ángel Alonso +Anne Douwe Bouma +Anthony Wilson +Arvind +ashfinal +Audrius Kažukauskas +Austin Wood +Aydar Khabibullin +babybeasimple +Benjamin Nørgaard +Bernhard Graf +Bill Casarin +binaryplease +Björn +Björn-Egil Dahlberg +BlackEagle +Boone Severson +bounceme +Bradlee Speice +Brandon Dulaney +Brandon Hilkert +Brian Hogan +Brian van Burken +Bruno Sutic +Camilo Payan +carme +Cézar Antáres +Chad Paradis +Chen Zhongzheng +Ches Martin +ChickenNuggers +Chipairon +Chris Dueck +Chris Nicola +Chris Sims +Christian +Christian Höltje +Christian Neumüller +Christopher Joslyn +chrisyue +Ciro Santilli +Ciro Santilli 六四事件 法轮功 +Claudio Maradonna +Connor Atherton +Cooper LeBrun +Corentin Peuvrel +Craig Paterson +Craig P Jolicoeur +crazymaster +daa84 +Daeyun Shin +Dale Roberts +Daniel Hahler +Dan Loewenherz +Danny Navarro +daoo +Darrell Hamilton +David Arvelo +David Barnett +David C. Bishop +David Deryl Downey - AKA Deryl R. Doucette +David Rodríguez de Dios +David Sanson +dengyaolong +Derek Morey +dhilipsiva +djdt +Dmitry Dementev +Donny Yang +DSIW +dzikie drożdże +Eduardo Gurgel +Eli Gundry +emzap79 +Enric Lluelles +Enrico Maria De Angelis +Erich Heine +Erik Westrup +Ernest +Eugene Kalinin +Eustaquio Rangel +Eustáquio Rangel +Fatih Arslan +Felix Jung +Filipe Giusti +Florent Lévigne +Florian Sattler +frans +Fuad Saud +Gabriel Chavez +Gaël Chamoulaud +Gea-Suan Lin +George Guimarães +George Lee +Georgios Samaras +Gert +gfixler +Gilad Peleg +gk +goonnow +Gueunet Charles +Gui Lin +guneysus +Gustavo Chain +Gustavo Ferreira +Hans-Guenter +Harald Wartig +Henrik Kjelsberg +HIRAKI Satoru +Holger Rapp +Honza +Honza Pokorny +hulufei +Igor Goldvekht +Ilker Cetinkaya +indi +Indra Susila +Ionică Bizău +Iuri Fernandes +Jack Stalnaker +Jacobo de Vera +Jacques Kvam +jake romer +Jakub Stasiak +James Turley +Jan Mollowitz +Jason S. Jones +Jean Jordaan +Jeffrey Tratner +Jens Hoepken +jiangyc0 +Jim Deville +Jinzhu +Joey Curtin +Johannes Wienke +jonasac +Jonas Bygdén +Jonathan Martin +Jorge García +Jorge López Pérez +Joseph Lin +Josh Bode +Josh Davis +Josh Matthews +Josh Vandergrift +Josh Wainwright +JuanPablo +Julian Bennecker +Julien Deniau +Julien Pivard +Julien Stechele +Julien STECHELE +Kalinin Eugene +kenshin54 +Kentaro Imai +Kevin Koltz +Kevin Lui +Kevin Mees +Kevin Murray +Kevin Schaul +Konstantin +Konstantin Gorodinskiy +Laas Toom +Laurent Georget +laxtiz +Leandro Moreira +Leonardo B +Leonidez Acosta +linduxed +Li Xin +Louis +Louis Pilfold +Lucas Hoffmann +Luis Carlos Cruz +Luis Carlos Cruz Carballo +Luiz Gonzaga dos Santos Filho +majjoha +mangege +Marc Camuzat +Marcelo D Montu +Marcelo Jacobus +Marcin Kulik +Marcus Kammer +Marc Weber +Mario de Frutos +Markus Benning +marocchino +Martin Atukunda +Martin Heuschober +Martxel Lasa +Matěj Cepl +Mathew Attlee +Mathieu Comandon +Matthew Barry +Matthias Viehweger +Mattia Tezzele +Matt Rasband +Matt Stevens +Mauro Porras P +Maximiliano Robaina +Mayeu (Cast) +Meng Zhuo +Michael Gehring +Michael Hinrichs +Michael Rutter +Michael Thessel +Michi Huber +Mickey +midchildan +Mike Foley +Mike Smullin +Miki Tebeka +Minjong Chung +M. Maxwell Watson +mMontu +mockturtl +m-pilia +Muhammad Hallaj Subery +mwcz +Namit +Nan Cloudio Jiang +Nan Zheng +Nate Mara +netei +Ngo The Trung +Nguyen Le +Nick Janetakis +Nicklasos +Nick Papanastasiou +Nicolas G. Querol +Nico Suhl +No Ducks +Norman Messtorff +obaoba +oddlydrawn +Oleg Voronkovich +Ole Hansen +Oliver Andrich +Ondrej Slinták +onemanstartup +opennota +Paco Esteban +Panagiotis Mavrogiorgos +Paolo Cretaro +Pascal +Paulo Romeira +Pawel Jankowski +phcerdan +Philippe Mongeau +Philipp Jovanovic +Piotr Jawniak +Piotr Yordanov +Pirogov Evgenij +Pompeu +Povilas Balzaravicius Pawka +Procras +protream +pydave +r4d2 +Radosław Szymczyszyn +Ralph-Wang +Raül Torralba +raydeal +rcolombo +Rekky +René +Rene Vergara +Renzo Poddighe +Reyes Yang +ricardogcolombo +Ricardo Jesus +Rich Layte +Roberto Miranda +robin +Robin Grindrod +Rok Garbas +Roland Sommer +Rory McNamara +rsw0x +rtorralba +Ruben Vereecken +Ryan Bright +Ryan Pineo +Ryan Wang +Sam Shepherd +Santiago Gallego +sasidhar-d +Sathors +Sebastian Röder +Sebastian Wiesner +Sergey Lebedev +Sergey Zasenko +Serhiy Oplakanets +SevereOverfl0w +Simeon F. Willbanks +Simeon Willbanks +Simon Désaulniers +sirex +skv +Sokovikov +Srijan Choudhary +Steeve +stefan +Stephen Tudor +Stephen Woods +Steve Brown +Steven Humphrey +Steven Oliver +Stuart Grimshaw +Sudar +¨switch87¨ +Tevin Zhang +theocrite +Thiago de Arruda +Thomas Duerr +Thomas Szymanski +tinyladi +Tobias Witt +Tobie Warburton +Tomasz Wisniewski +Tom Vincent +Tony +Tony Narlock +toogley +Torbjørn Vatn +tormaroe +ToruIwashita +Travis Holton +Trevor Sullivan +troydm +tUrG0n +twabiko +Tyler Ball +tyronepost +Tyrone Post +Vadim Khohlov +Vincent Hsu +Vladimir Rybas +Vladislav Khvostov +Vorzard +Vzaa +Waldecir Santos +Wildsky Fann +William Ma +William Travis Holton +X4fyr +xz.zhang +Yamamoto Yuji +Yannick Brehon +yerv000 +Yike Lu +yuhuanbo +Yu Huanbo +Yves Lange +yvhn +zauguin +Zaven Muradyan +ZPH diff --git a/sources_non_forked/vim-snippets/UltiSnips/all.snippets b/sources_non_forked/vim-snippets/UltiSnips/all.snippets index 8b7079e2..215487ec 100644 --- a/sources_non_forked/vim-snippets/UltiSnips/all.snippets +++ b/sources_non_forked/vim-snippets/UltiSnips/all.snippets @@ -18,7 +18,7 @@ snippet box "A nice box with the current comment symbol" b box = make_box(len(t[1])) snip.rv = box[0] snip += box[1] -`${1:content}`!p +`${1:${VISUAL:content}}`!p box = make_box(len(t[1])) snip.rv = box[2] snip += box[3]` @@ -32,7 +32,7 @@ if not snip.c: box = make_box(len(t[1]), width) snip.rv = box[0] snip += box[1] -`${1:content}`!p +`${1:${VISUAL:content}}`!p box = make_box(len(t[1]), width) snip.rv = box[2] snip += box[3]` diff --git a/sources_non_forked/vim-snippets/UltiSnips/cuda.snippets b/sources_non_forked/vim-snippets/UltiSnips/cuda.snippets new file mode 100644 index 00000000..2a9a7e5e --- /dev/null +++ b/sources_non_forked/vim-snippets/UltiSnips/cuda.snippets @@ -0,0 +1,5 @@ +priority -50 + +extends cpp + +# vim:ft=snippets: diff --git a/sources_non_forked/vim-snippets/UltiSnips/html.snippets b/sources_non_forked/vim-snippets/UltiSnips/html.snippets index 084d9f78..026985cb 100644 --- a/sources_non_forked/vim-snippets/UltiSnips/html.snippets +++ b/sources_non_forked/vim-snippets/UltiSnips/html.snippets @@ -258,7 +258,7 @@ snippet style "XHTML