diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-24 23:42:59 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-24 23:42:59 +0200 | 
| commit | 4203435c48adfec7950f5b9ab745e87c5296e486 (patch) | |
| tree | 84a389447483a13e50d46c0eefb7d7eec51b4141 /ftplugin/latex-box/common.vim | |
| parent | 271b63d71707720ad0d35590b8cb50f8f8f43014 (diff) | |
| download | vim-polyglot-4203435c48adfec7950f5b9ab745e87c5296e486.tar.gz vim-polyglot-4203435c48adfec7950f5b9ab745e87c5296e486.zip  | |
Updatev1.13.3
Diffstat (limited to 'ftplugin/latex-box/common.vim')
| -rw-r--r-- | ftplugin/latex-box/common.vim | 26 | 
1 files changed, 16 insertions, 10 deletions
diff --git a/ftplugin/latex-box/common.vim b/ftplugin/latex-box/common.vim index c5451027..f463b7e7 100644 --- a/ftplugin/latex-box/common.vim +++ b/ftplugin/latex-box/common.vim @@ -179,7 +179,13 @@ function! LatexBox_GetTexRoot()  	return fnamemodify(LatexBox_GetMainTexFile(), ':h')  endfunction -function! LatexBox_GetTexBasename(with_dir) +function! LatexBox_GetBuildBasename(with_dir) +	" 1. Check for g:LatexBox_jobname +	if exists('g:LatexBox_jobname') +		return g:LatexBox_jobname +	endif + +	" 2. Get the basename from the main tex file  	if a:with_dir  		return fnamemodify(LatexBox_GetMainTexFile(), ':r')  	else @@ -190,48 +196,48 @@ endfunction  function! LatexBox_GetAuxFile()  	" 1. check for b:build_dir variable  	if exists('b:build_dir') && isdirectory(b:build_dir) -		return b:build_dir . '/' . LatexBox_GetTexBasename(0) . '.aux' +		return b:build_dir . '/' . LatexBox_GetBuildBasename(0) . '.aux'  	endif  	" 2. check for g:LatexBox_build_dir variable  	if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir) -		return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0) . '.aux' +		return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0) . '.aux'  	endif  	" 3. use the base name of main tex file -	return LatexBox_GetTexBasename(1) . '.aux' +	return LatexBox_GetBuildBasename(1) . '.aux'  endfunction  function! LatexBox_GetLogFile()  	" 1. check for b:build_dir variable  	if exists('b:build_dir') && isdirectory(b:build_dir) -		return b:build_dir . '/' . LatexBox_GetTexBasename(0) . '.log' +		return b:build_dir . '/' . LatexBox_GetBuildBasename(0) . '.log'  	endif  	" 2. check for g:LatexBox_build_dir variable  	if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir) -		return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0) . '.log' +		return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0) . '.log'  	endif  	" 3. use the base name of main tex file -	return LatexBox_GetTexBasename(1) . '.log' +	return LatexBox_GetBuildBasename(1) . '.log'  endfunction  function! LatexBox_GetOutputFile()  	" 1. check for b:build_dir variable  	if exists('b:build_dir') && isdirectory(b:build_dir) -		return b:build_dir . '/' . LatexBox_GetTexBasename(0) +		return b:build_dir . '/' . LatexBox_GetBuildBasename(0)  					\ . '.' . g:LatexBox_output_type  	endif  	" 2. check for g:LatexBox_build_dir variable  	if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir) -		return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0) +		return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0)  					\ . '.' . g:LatexBox_output_type  	endif  	" 3. use the base name of main tex file -	return LatexBox_GetTexBasename(1) . '.' . g:LatexBox_output_type +	return LatexBox_GetBuildBasename(1) . '.' . g:LatexBox_output_type  endfunction  " }}}  | 
