diff options
| author | Peter Odding <peter@peterodding.com> | 2011-04-12 20:28:59 +0200 | 
|---|---|---|
| committer | Peter Odding <peter@peterodding.com> | 2011-04-12 20:28:59 +0200 | 
| commit | c1635d69d44980cfd5b8d6f770deeb02780279b9 (patch) | |
| tree | a9b1f8b556879ac756300d0d5578c46783b3faf0 | |
| parent | 3466f613e926645ac6fd6474cf0404adc416477b (diff) | |
| download | vim-easytags-c1635d69d44980cfd5b8d6f770deeb02780279b9.tar.gz | |
Remove useless "easytags_register_late" option
Because s:RegisterTagsFile() is (supposed to be) idempotent we can just
call it twice instead of relying on users to properly configure the
plug-in. See the discussion on the previous commit* for more information.
* http://github.com/xolox/vim-easytags/commit/3466f61
| -rw-r--r-- | plugin/easytags.vim | 29 | 
1 files changed, 10 insertions, 19 deletions
| diff --git a/plugin/easytags.vim b/plugin/easytags.vim index 88d894a..7bfc806 100644 --- a/plugin/easytags.vim +++ b/plugin/easytags.vim @@ -1,10 +1,10 @@  " Vim plug-in  " Author: Peter Odding <peter@peterodding.com> -" Last Change: April 11, 2011 +" Last Change: April 12, 2011  " URL: http://peterodding.com/code/vim/easytags/  " Requires: Exuberant Ctags (http://ctags.sf.net)  " License: MIT -" Version: 2.2.3 +" Version: 2.2.4  " Support for automatic update using the GLVS plug-in.  " GetLatestVimScripts: 3114 1 :AutoInstall: easytags.zip @@ -50,10 +50,6 @@ if !exists('g:easytags_include_members')    let g:easytags_include_members = 0  endif -if !exists('g:easytags_register_late') -  let g:easytags_register_late = 0 -endif -  function! s:InitEasyTags(version)    " Check that the location of Exuberant Ctags has been configured or that the    " correct version of the program exists in one of its default locations. @@ -156,13 +152,10 @@ function! s:RegisterTagsFile()    endif  endfunction -" By default this plug-in initializes the &tags option as soon as possible so -" that the global tags file is available when using "vim -t some_tag". If you -" don't use "vim -t" and want to defer registering the global tags file until -" the interface has been initialized you can set g:easytags_register_late=1. -if !g:easytags_register_late -  call s:RegisterTagsFile() -endif +" The plug-in initializes the &tags option as soon as possible so that the +" global tags file is available when using "vim -t some_tag". If &tags is +" reset, we'll try again on the "VimEnter" automatic command event (below). +call s:RegisterTagsFile()  " The :UpdateTags and :HighlightTags commands. {{{1 @@ -173,12 +166,10 @@ command! -bar HighlightTags call xolox#easytags#highlight()  augroup PluginEasyTags    autocmd! -  if g:easytags_register_late -    " This is the alternative way of registering the global tags file using -    " the automatic command event "VimEnter". Apparently this makes the -    " easytags plug-in behave better when used together with tplugin? -    autocmd VimEnter * call s:RegisterTagsFile() -  endif +  " This is the alternative way of registering the global tags file using +  " the automatic command event "VimEnter". Apparently this makes the +  " plug-in behave better when used together with tplugin? +  autocmd VimEnter * call s:RegisterTagsFile()    if g:easytags_always_enabled      " TODO Also on FocusGained because tags files might be updated externally?      autocmd BufReadPost,BufWritePost * call xolox#easytags#autoload() | 
