diff options
author | Peter Odding <peter@peterodding.com> | 2010-07-20 12:47:39 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2010-07-20 12:47:39 +0200 |
commit | 3b934f6e0d0d4a44875024713dd0aeefdcdd206b (patch) | |
tree | 9b7105b794c1feacc38e7cb406d254f35698c22f /autoload.vim | |
parent | ff64be5fe506a9a15dce28bac5b5585d4430f4a6 (diff) | |
download | vim-easytags-3b934f6e0d0d4a44875024713dd0aeefdcdd206b.tar.gz |
Another bug fix for the broken :set tags= command
Previously* I fixed a bug where easytags.vim failed to register the
global tags file created by the plug-in with Vim, because even though
the &tags option was set by the plug-in, Vim would refuse to acknowledge
the new tags file, i.e. tagfiles() == [].
The fix then was to change :let &tags= to :set tags= which apparently
has a different implementation from :let &tags=?! I assumed this fix
would be valid for both Windows and UNIX, but apparently this still
doesn't work on Windows! There we actually have to use feedkeys() to
convince Vim to change the &tags option... What a hack! :-(
BTW I also fixed an embarrassing typo in the initialization code.
* Bug fix for strange "E433: No tags file" problem:
http://github.com/xolox/vim-easytags/commit/4fef0c17749e687d670b2e9e4e429022ec4c1055
Diffstat (limited to 'autoload.vim')
-rw-r--r-- | autoload.vim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/autoload.vim b/autoload.vim index 847c0d2..8d3462b 100644 --- a/autoload.vim +++ b/autoload.vim @@ -1,6 +1,6 @@ " Vim script " Author: Peter Odding <peter@peterodding.com> -" Last Change: July 18, 2010 +" Last Change: July 20, 2010 " URL: http://peterodding.com/code/vim/easytags/ let s:script = expand('<sfile>:p:~') @@ -78,7 +78,7 @@ function! easytags#update_cmd(filter_invalid_tags) " {{{2 let listing = system(join(command)) if v:shell_error let msg = "Failed to update tags file %s: %s!" - throw printf(msg, fnamemodify(tagsfile, ':~'), strtrans(v:exception)) + throw printf(msg, fnamemodify(tagsfile, ':~'), strtrans(listing)) endif call easytags#add_tagged_file(filename) let msg = "%s: Updated tags for %s in %s." @@ -151,8 +151,8 @@ function! easytags#supported_filetypes() " {{{2 endif let s:supported_filetypes = split(listing, '\n') call map(s:supported_filetypes, 'easytags#to_vim_ft(v:val)') - let msg = "%s: Retrieved supported languages in %s." - call xolox#timer#stop(msg, s:script, start) + let msg = "%s: Retrieved %i supported languages in %s." + call xolox#timer#stop(msg, s:script, len(s:supported_filetypes), start) endif return s:supported_filetypes endfunction @@ -283,6 +283,8 @@ function! s:cache_tagged_files() " {{{2 endfunction function! s:set_tagged_files(entries) " {{{2 + " TODO use taglist() instead of readfile() so that all tag files are + " automatically used :-) let s:tagged_files = {} for entry in a:entries let filename = matchstr(entry, '^[^\t]\+\t\zs[^\t]\+') |