Minor change of init structure

This commit is contained in:
Karl Yngve Lervåg 2015-04-01 15:54:14 +02:00
parent ca29d624bc
commit da69a60312

View File

@ -70,33 +70,6 @@ function! s:init_environment() " {{{1
call vimtex#util#set_default('g:vimtex#data', [])
call vimtex#util#set_default('b:vimtex', {})
" Ensure tex files are prioritized when listing files
for suf in [
\ '.log',
\ '.aux',
\ '.bbl',
\ '.out',
\ '.blg',
\ '.brf',
\ '.cb',
\ '.dvi',
\ '.fdb_latexmk',
\ '.fls',
\ '.idx',
\ '.ilg',
\ '.ind',
\ '.inx',
\ '.pdf',
\ '.synctex.gz',
\ '.toc',
\ ]
execute 'set suffixes+=' . suf
endfor
" Set some file type specific vim options
setlocal suffixesadd+=.tex
setlocal commentstring=\%\ %s
" Create new or link to existing blob
let main = s:get_main()
let id = s:get_id(main)
@ -130,7 +103,39 @@ function! s:init_environment() " {{{1
endfunction
function! s:init_options() " {{{1
let s:save_cpo = &cpo
set cpo&vim
" Ensure tex files are prioritized when listing files
for suf in [
\ '.log',
\ '.aux',
\ '.bbl',
\ '.out',
\ '.blg',
\ '.brf',
\ '.cb',
\ '.dvi',
\ '.fdb_latexmk',
\ '.fls',
\ '.idx',
\ '.ilg',
\ '.ind',
\ '.inx',
\ '.pdf',
\ '.synctex.gz',
\ '.toc',
\ ]
execute 'set suffixes+=' . suf
endfor
setlocal suffixesadd=.tex
setlocal commentstring=\%\ %s
let &cpo = s:save_cpo
unlet s:save_cpo
endfunction
" }}}1
function! s:get_id(main) " {{{1