Updated augroup names
This commit is contained in:
parent
b1b15c6877
commit
d36be66c93
@ -35,19 +35,6 @@ function! vimtex#fold#init_script() " {{{1
|
||||
" Define some script variables
|
||||
let s:parts = '\v^\s*(\\|\% Fake)(' . join(g:vimtex_fold_parts, '|') . ')>'
|
||||
let s:secs = '\v^\s*(\\|\% Fake)(' . join(g:vimtex_fold_sections, '|') . ')>'
|
||||
|
||||
" For automatic folding with foldmethod=expr:
|
||||
" The foldexpr function returns "=" for most lines, which means it can
|
||||
" become slow for large files. The following is a hack that is based on
|
||||
" this reply to a discussion on the Vim Developer list:
|
||||
" http://permalink.gmane.org/gmane.editors.vim.devel/14100
|
||||
if g:vimtex_fold_automatic
|
||||
augroup latex_fold
|
||||
autocmd!
|
||||
autocmd InsertEnter *.tex call FdmSave()
|
||||
autocmd InsertLeave *.tex call FdmRestore()
|
||||
augroup END
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" }}}1
|
||||
@ -66,14 +53,27 @@ function! vimtex#fold#init_buffer() " {{{1
|
||||
" Define commands
|
||||
command! -buffer VimtexRefreshFolds call vimtex#fold#refresh('zx')
|
||||
|
||||
" Set options for automatic/manual mode
|
||||
" Set options for automatic/manual folding mode
|
||||
if g:vimtex_fold_automatic
|
||||
nnoremap <silent><buffer> u :call FdmSave()<cr>u:call FdmRestore()<cr>
|
||||
else
|
||||
augroup latex_fold
|
||||
|
||||
" For automatic folding with foldmethod=expr:
|
||||
" The foldexpr function returns "=" for most lines, which means it can
|
||||
" become slow for large files. The following is a hack that is based on
|
||||
" this reply to a discussion on the Vim Developer list:
|
||||
" http://permalink.gmane.org/gmane.editors.vim.devel/14100
|
||||
if g:vimtex_fold_automatic
|
||||
augroup vimtex_fold_automatic
|
||||
autocmd!
|
||||
autocmd CursorMoved *.tex call vimtex#fold#refresh('zx')
|
||||
autocmd CursorMoved *.tex autocmd! latex_fold
|
||||
autocmd InsertEnter <buffer> call FdmSave()
|
||||
autocmd InsertLeave <buffer> call FdmRestore()
|
||||
augroup END
|
||||
endif
|
||||
else
|
||||
augroup vimtex_fold_manual
|
||||
autocmd!
|
||||
autocmd CursorMoved <buffer> call vimtex#fold#refresh('zx')
|
||||
autocmd CursorMoved <buffer> autocmd! vimtex_fold_manual
|
||||
augroup END
|
||||
endif
|
||||
endfunction
|
||||
|
@ -28,7 +28,7 @@ function! vimtex#latexmk#init_script() " {{{1
|
||||
|
||||
" Ensure that all latexmk processes are stopped when vim exits
|
||||
if g:vimtex_latexmk_continuous
|
||||
augroup latex_latexmk
|
||||
augroup vimtex_latexmk
|
||||
autocmd!
|
||||
autocmd VimLeave * call vimtex#latexmk#stop_all()
|
||||
augroup END
|
||||
@ -73,7 +73,7 @@ function! vimtex#latexmk#init_buffer() " {{{1
|
||||
|
||||
" Kill running latexmk process if all buffers for a latex project are closed
|
||||
if g:vimtex_latexmk_continuous
|
||||
augroup latex_latexmk
|
||||
augroup vimtex_latexmk
|
||||
autocmd BufLeave <buffer> call s:buffer_left()
|
||||
autocmd BufDelete <buffer> call s:buffer_deleted()
|
||||
augroup END
|
||||
@ -269,7 +269,7 @@ function! vimtex#latexmk#output() " {{{1
|
||||
silent exe 'split ' . tmp
|
||||
|
||||
" Better automatic update
|
||||
augroup tmp_update
|
||||
augroup vimtex_tmp_update
|
||||
autocmd!
|
||||
autocmd BufEnter * silent! checktime
|
||||
autocmd CursorHold * silent! checktime
|
||||
@ -277,7 +277,7 @@ function! vimtex#latexmk#output() " {{{1
|
||||
autocmd CursorMoved * silent! checktime
|
||||
autocmd CursorMovedI * silent! checktime
|
||||
augroup END
|
||||
silent exe 'autocmd! BufDelete ' . tmp . ' augroup! tmp_update'
|
||||
silent exe 'autocmd! BufDelete ' . tmp . ' augroup! vimtex_tmp_update'
|
||||
|
||||
" Set some mappings
|
||||
nnoremap <buffer> <silent> q :bwipeout<cr>
|
||||
|
@ -17,7 +17,7 @@ function! vimtex#motion#init_script() " {{{1
|
||||
|
||||
" Highlight matching parens ($, (), ...)
|
||||
if g:vimtex_motion_matchparen
|
||||
augroup latex_motion
|
||||
augroup vimtex_motion
|
||||
autocmd!
|
||||
" Disable matchparen autocommands
|
||||
autocmd BufEnter *.tex
|
||||
|
Loading…
Reference in New Issue
Block a user