From ca9a4d8847db5aed86d94c0223914aca64029ab3 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Tue, 14 Jun 2011 00:29:49 +0200 Subject: Fix caching of tagged files (for file type specific tags files) * The easytags plug-in caches known tagged files so it doesn't have to run :UpdateTags whenever you edit an existing file. The previous implementation was based on the assumption of one global tags file so wasn't compatible with the concept of file type specific tags files. This should now be fixed. * Previously the plug-in worked with a combination of parsed and unparsed tags file entries which made the code confusing. I've now cleaned this up so that the plug-in only keeps one type of data in memory. * Moved resetting of s:cached_filenames from the end to the start of the functions that call s:canonicalize() to avoid caching invalid data. PS. I've benchmarked two cache_tagged_files() implementations, one using taglist('.'), the other calling xolox#easytags#read_tagsfile() on each tags file reported by the tagfiles() function. It turns out that taglist('.') is very slow, which explains why I went with the code that calls xolox#easytags#read_tagsfile() in a loop. --- plugin/easytags.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugin') diff --git a/plugin/easytags.vim b/plugin/easytags.vim index 9697967..433544d 100644 --- a/plugin/easytags.vim +++ b/plugin/easytags.vim @@ -1,10 +1,10 @@ " Vim plug-in " Author: Peter Odding -" Last Change: June 13, 2011 +" Last Change: June 14, 2011 " URL: http://peterodding.com/code/vim/easytags/ " Requires: Exuberant Ctags (http://ctags.sf.net) " License: MIT -" Version: 2.3.1 +" Version: 2.3.2 " Support for automatic update using the GLVS plug-in. " GetLatestVimScripts: 3114 1 :AutoInstall: easytags.zip -- cgit v1.2.3