From 4fef0c17749e687d670b2e9e4e429022ec4c1055 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Sat, 10 Jul 2010 18:27:50 +0200 Subject: Bug fix for strange "E433: No tags file" problem The plug-in is supposed to automatically register the global tags file with Vim by setting the "tags" option but this didn't work because of what's probably a bug in Vim: When you set the "tags" option using the following syntax, Vim will fail to add the new tags file: let &tags = ... But when you switch to the following syntax it works: :set tags=... --- easytags.vim | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/easytags.vim b/easytags.vim index 30efb3d..de37b5e 100644 --- a/easytags.vim +++ b/easytags.vim @@ -1,10 +1,10 @@ " Vim plug-in " Maintainer: Peter Odding -" Last Change: June 15, 2010 +" Last Change: July 10, 2010 " URL: http://peterodding.com/code/vim/easytags " Requires: Exuberant Ctags (http://ctags.sf.net) " License: MIT -" Version: 1.9.3 +" Version: 1.9.6 " Support for automatic update using the GLVS plug-in. " GetLatestVimScripts: 3114 1 :AutoInstall: easytags.zip @@ -102,19 +102,15 @@ endif " Parse the &tags option and get a list of all configured tags files including " non-existing files (this is why we can't just call the tagfiles() function). let s:tagfiles = xolox#option#split_tags(&tags) -let s:expanded = map(copy(s:tagfiles), 'expand(v:val)') +let s:expanded = map(copy(s:tagfiles), 'resolve(expand(v:val))') " Add the tags file to the &tags option when the user hasn't done so already. -if index(s:expanded, expand(g:easytags_file)) == -1 - let s:entry = g:easytags_file - if (has('win32') || has('win64')) && s:entry =~ '^\~[\\/]' - " On UNIX you can use ~/ in &tags but on Windows that doesn't work. - let s:entry = expand(s:entry) - endif - let &tags = xolox#option#join_tags(insert(s:tagfiles, s:entry, 0)) +if index(s:expanded, resolve(expand(g:easytags_file))) == -1 + let s:value = substitute(expand(g:easytags_file), '[\\, ]', '\\\0', 'g') + execute 'set tags=' . s:value . ',' . &tags endif -unlet! s:tagfiles s:expanded s:entry +unlet! s:tagfiles s:expanded s:value " The :UpdateTags and :HighlightTags commands. {{{1 -- cgit v1.2.3