diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-11 15:05:13 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-11 15:05:13 +0200 |
commit | 271b63d71707720ad0d35590b8cb50f8f8f43014 (patch) | |
tree | 1b71daa457afc68465f66ee2afc9a00c1380f23d /ftplugin | |
parent | acd7ce59503b22ac7663fc25776efe25e266f1d4 (diff) | |
download | vim-polyglot-1.13.2.tar.gz vim-polyglot-1.13.2.zip |
Updatev1.13.2
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/cucumber.vim | 5 | ||||
-rw-r--r-- | ftplugin/latex-box/common.vim | 7 | ||||
-rw-r--r-- | ftplugin/latex-box/complete.vim | 10 | ||||
-rw-r--r-- | ftplugin/latex-box/latexmk.vim | 18 | ||||
-rw-r--r-- | ftplugin/perl6.vim | 2 |
5 files changed, 31 insertions, 11 deletions
diff --git a/ftplugin/cucumber.vim b/ftplugin/cucumber.vim index b2f60fdd..af734eec 100644 --- a/ftplugin/cucumber.vim +++ b/ftplugin/cucumber.vim @@ -19,6 +19,9 @@ setlocal omnifunc=CucumberComplete let b:undo_ftplugin = "setl fo< com< cms< ofu<" let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') +if !exists("b:cucumber_steps_glob") + let b:cucumber_steps_glob = b:cucumber_root.'/**/*.rb' +endif if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") cnoremap <SID>foldopen <Bar>if &foldopen =~# 'tag'<Bar>exe 'norm! zv'<Bar>endif @@ -52,7 +55,7 @@ endfunction function! s:allsteps() let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)' let steps = [] - for file in split(glob(b:cucumber_root.'/**/*.rb'),"\n") + for file in split(glob(b:cucumber_steps_glob),"\n") let lines = readfile(file) let num = 0 for line in lines diff --git a/ftplugin/latex-box/common.vim b/ftplugin/latex-box/common.vim index 59cf95d6..c5451027 100644 --- a/ftplugin/latex-box/common.vim +++ b/ftplugin/latex-box/common.vim @@ -264,7 +264,12 @@ function! LatexBox_View(...) if has('win32') let cmd = '!start /b ' . cmd . ' >nul' else - let cmd = '!' . cmd . ' &>/dev/null &' + let cmd = '!' . cmd . ' ' + if fnamemodify(&shell, ':t') ==# 'fish' + let cmd .= ' >/dev/null ^/dev/null &' + else + let cmd .= ' &>/dev/null &' + endif endif silent execute cmd if !has("gui_running") diff --git a/ftplugin/latex-box/complete.vim b/ftplugin/latex-box/complete.vim index 0ab8f974..e8befcfc 100644 --- a/ftplugin/latex-box/complete.vim +++ b/ftplugin/latex-box/complete.vim @@ -24,7 +24,7 @@ if !exists('g:LatexBox_cite_pattern') let g:LatexBox_cite_pattern = '\C\\\a*cite\a*\*\?\(\[[^\]]*\]\)*\_\s*{' endif if !exists('g:LatexBox_ref_pattern') - let g:LatexBox_ref_pattern = '\C\\v\?\(eq\|page\|[cC]\|labelc\)\?ref\*\?\_\s*{' + let g:LatexBox_ref_pattern = '\C\\v\?\(eq\|page\|[cC]\|labelc\|name\)\?ref\*\?\_\s*{' endif if !exists('g:LatexBox_completion_environments') @@ -255,14 +255,14 @@ function! LatexBox_BibSearch(regexp) if has('win32') let l:old_shellslash = &l:shellslash setlocal noshellslash - silent execute '! cd ' shellescape(LatexBox_GetTexRoot()) . + call system('cd ' . shellescape(LatexBox_GetTexRoot()) . \ ' & bibtex -terse ' - \ . fnamemodify(auxfile, ':t') . ' >nul' + \ . fnamemodify(auxfile, ':t') . ' >nul') let &l:shellslash = l:old_shellslash else - silent execute '! cd ' shellescape(LatexBox_GetTexRoot()) . + call system('cd ' . shellescape(LatexBox_GetTexRoot()) . \ ' ; bibtex -terse ' - \ . fnamemodify(auxfile, ':t') . ' >/dev/null' + \ . fnamemodify(auxfile, ':t') . ' >/dev/null') endif let lines = split(substitute(join(readfile(bblfile), "\n"), diff --git a/ftplugin/latex-box/latexmk.vim b/ftplugin/latex-box/latexmk.vim index 1285bc64..4b02d248 100644 --- a/ftplugin/latex-box/latexmk.vim +++ b/ftplugin/latex-box/latexmk.vim @@ -166,7 +166,11 @@ function! LatexBox_Latexmk(force) elseif match(&shell, '/tcsh$') >= 0 let env = 'setenv max_print_line ' . max_print_line . '; ' else - let env = 'max_print_line=' . max_print_line + if fnamemodify(&shell, ':t') ==# 'fish' + let env = 'set max_print_line ' . max_print_line . '; and ' + else + let env = 'max_print_line=' . max_print_line + endif endif " Set environment options @@ -177,7 +181,11 @@ function! LatexBox_Latexmk(force) " Make sure to switch drive as well as directory let cmd = 'cd /D ' . texroot . ' && ' else - let cmd = 'cd ' . texroot . ' && ' + if fnamemodify(&shell, ':t') ==# 'fish' + let cmd = 'cd ' . texroot . '; and ' + else + let cmd = 'cd ' . texroot . ' && ' + endif endif let cmd .= env . ' latexmk' if ! g:LatexBox_personal_latexmkrc @@ -203,7 +211,11 @@ function! LatexBox_Latexmk(force) if has('win32') let cmd .= ' >nul' else - let cmd .= ' &>/dev/null' + if fnamemodify(&shell, ':t') ==# 'fish' + let cmd .= ' >/dev/null ^/dev/null' + else + let cmd .= ' &>/dev/null' + endif endif if g:LatexBox_latexmk_async diff --git a/ftplugin/perl6.vim b/ftplugin/perl6.vim index 9a21122b..c32ef43e 100644 --- a/ftplugin/perl6.vim +++ b/ftplugin/perl6.vim @@ -20,7 +20,7 @@ setlocal formatoptions-=t setlocal formatoptions+=crqol setlocal keywordprg=p6doc -setlocal comments=:# +setlocal comments=:#\|,:#=,:# setlocal commentstring=#%s " Change the browse dialog on Win32 to show mainly Perl-related files |