diff options
author | Peter Odding <peter@peterodding.com> | 2010-06-10 23:42:08 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2010-06-10 23:42:08 +0200 |
commit | 1c8733ee23d792bf5f7c325f6e5babec14f798f2 (patch) | |
tree | 5bf7b27ee1c5b2ca4db28a7f81c2c9857a4f8b39 | |
parent | 3f762e26ab7b9730ec0757257a9bd924d1f6f05e (diff) | |
download | vim-easytags-1c8733ee23d792bf5f7c325f6e5babec14f798f2.tar.gz |
Moved &tags option parsing to autoload script
The autoload/xolox/option.vim script isn't included in this repository
because I call the autoload/xolox/*.vim scripts from several of my
plug-ins. If I were to include these dependencies in each plug-in
repository I would find myself copy/pasting bug fixes between
repositories and I don't want that. However the Makefile packages up all
required autoload scripts into the ZIP archives published on
www.vim.org.
-rw-r--r-- | easytags.vim | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/easytags.vim b/easytags.vim index 7e7c649..0b61721 100644 --- a/easytags.vim +++ b/easytags.vim @@ -77,20 +77,15 @@ unlet s:ctags_installed " 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 = [] -let s:expanded = [] -for s:entry in split(&tags, '[^\\]\zs,') - call add(s:tagfiles, s:entry) - call add(s:expanded, expand(substitute(s:entry, '\\\([\\, ]\)', '\1', 'g'))) -endfor +let s:tagfiles = xolox#option#split_tags(&tags) +let s:expanded = map(copy(s:tagfiles), '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 = substitute(expand(g:easytags_file), '[, ]', '\\\0', 'g') - let &tags = join(insert(s:tagfiles, s:entry, 0), ',') + let &tags = xolox#option#join_tags(insert(s:tagfiles, g:easytags_file, 0)) endif -unlet s:tagfiles s:expanded s:entry +unlet s:tagfiles s:expanded " The :UpdateTags and :HighlightTags commands. {{{1 |