From 617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 11 Nov 2014 02:37:21 +0100 Subject: Update --- ftplugin/latex-box/complete.vim | 1 + ftplugin/latex-box/folding.vim | 39 ++++++++++++++++++++++----------------- ftplugin/latex-box/latexmk.vim | 7 ++++++- 3 files changed, 29 insertions(+), 18 deletions(-) (limited to 'ftplugin/latex-box') diff --git a/ftplugin/latex-box/complete.vim b/ftplugin/latex-box/complete.vim index 458e8d81..150b00e7 100644 --- a/ftplugin/latex-box/complete.vim +++ b/ftplugin/latex-box/complete.vim @@ -367,6 +367,7 @@ function! s:ExtractLabels() " Ignore cref entries (because they are duplicates) if curname =~# "@cref$" + let [lblline, lblbegin] = searchpos( '\\newlabel{', 'ecW' ) continue endif diff --git a/ftplugin/latex-box/folding.vim b/ftplugin/latex-box/folding.vim index 4fe13bc8..5d733c23 100644 --- a/ftplugin/latex-box/folding.vim +++ b/ftplugin/latex-box/folding.vim @@ -156,7 +156,7 @@ let s:notcomment = '\%(\%(\\\@= 0 + if line =~# s:envbeginpattern && line =~# s:envendpattern + " If the begin and end pattern are on the same line , do not fold + return "=" + else + if line =~# s:envbeginpattern + if g:LatexBox_fold_envs == 1 return "a1" else - return "=" + let env = matchstr(line,'\\begin\*\?{\zs\w*\*\?\ze}') + if index(g:LatexBox_fold_envs_force, env) >= 0 + return "a1" + else + return "=" + endif endif - endif - elseif line =~# s:envendpattern - if g:LatexBox_fold_envs == 1 - return "s1" - else - let env = matchstr(line,'\\end\*\?{\zs\w*\*\?\ze}') - if index(g:LatexBox_fold_envs_force, env) >= 0 + elseif line =~# s:envendpattern + if g:LatexBox_fold_envs == 1 return "s1" else - return "=" + let env = matchstr(line,'\\end\*\?{\zs\w*\*\?\ze}') + if index(g:LatexBox_fold_envs_force, env) >= 0 + return "s1" + else + return "=" + endif endif endif endif @@ -288,7 +293,7 @@ function! LatexBox_FoldText_title() endif " Parts, sections and fakesections - let sections = '\(\(sub\)*section\|part\|chapter\)' + let sections = '\(\(sub\)*\(section\|paragraph\)\|part\|chapter\)' let secpat1 = '^\s*\\' . sections . '\*\?\s*{' let secpat2 = '^\s*\\' . sections . '\*\?\s*\[' if line =~ '\\frontmatter' diff --git a/ftplugin/latex-box/latexmk.vim b/ftplugin/latex-box/latexmk.vim index bb70f83d..6c5d3eb1 100644 --- a/ftplugin/latex-box/latexmk.vim +++ b/ftplugin/latex-box/latexmk.vim @@ -23,6 +23,9 @@ endif if ! exists('g:LatexBox_quickfix') let g:LatexBox_quickfix = 1 endif +if ! exists('g:LatexBox_personal_latexmkrc') + let g:LatexBox_personal_latexmkrc = 0 +endif " }}} @@ -177,7 +180,9 @@ function! LatexBox_Latexmk(force) let cmd = 'cd ' . texroot . ' && ' endif let cmd .= env . ' latexmk' - let cmd .= ' -' . g:LatexBox_output_type + if ! g:LatexBox_personal_latexmkrc + let cmd .= ' -' . g:LatexBox_output_type + endif let cmd .= ' -quiet ' let cmd .= g:LatexBox_latexmk_options if a:force -- cgit v1.2.3