From d36be66c930a030f8c432c532cd7d1998b5dd386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sat, 20 Jun 2015 23:09:56 +0200 Subject: [PATCH] Updated augroup names --- autoload/vimtex/fold.vim | 34 +++++++++++++++++----------------- autoload/vimtex/latexmk.vim | 8 ++++---- autoload/vimtex/motion.vim | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/autoload/vimtex/fold.vim b/autoload/vimtex/fold.vim index 88c6647..4d30ec8 100644 --- a/autoload/vimtex/fold.vim +++ b/autoload/vimtex/fold.vim @@ -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 u :call FdmSave()u:call FdmRestore() + + " 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 InsertEnter call FdmSave() + autocmd InsertLeave call FdmRestore() + augroup END + endif else - augroup latex_fold + augroup vimtex_fold_manual autocmd! - autocmd CursorMoved *.tex call vimtex#fold#refresh('zx') - autocmd CursorMoved *.tex autocmd! latex_fold + autocmd CursorMoved call vimtex#fold#refresh('zx') + autocmd CursorMoved autocmd! vimtex_fold_manual augroup END endif endfunction diff --git a/autoload/vimtex/latexmk.vim b/autoload/vimtex/latexmk.vim index 8eb2736..530a15a 100644 --- a/autoload/vimtex/latexmk.vim +++ b/autoload/vimtex/latexmk.vim @@ -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 call s:buffer_left() autocmd BufDelete 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 q :bwipeout diff --git a/autoload/vimtex/motion.vim b/autoload/vimtex/motion.vim index b628bcc..afa6da2 100644 --- a/autoload/vimtex/motion.vim +++ b/autoload/vimtex/motion.vim @@ -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