From e955b7e1dcac093c7dcea36949f1fdcdb66ebf40 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Tue, 21 Oct 2014 20:13:47 +0200 Subject: Make xolox#easytags#filetypes#add_group() easier to understand --- autoload/xolox/easytags/filetypes.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'autoload') diff --git a/autoload/xolox/easytags/filetypes.vim b/autoload/xolox/easytags/filetypes.vim index 24652ab..bba6386 100644 --- a/autoload/xolox/easytags/filetypes.vim +++ b/autoload/xolox/easytags/filetypes.vim @@ -1,6 +1,6 @@ " Vim script " Author: Peter Odding -" Last Change: October 20, 2014 +" Last Change: October 21, 2014 " URL: http://peterodding.com/code/vim/easytags/ " This submodule of the vim-easytags plug-in translates between back and forth @@ -31,9 +31,10 @@ let s:filetype_groups = {} function! xolox#easytags#filetypes#add_group(...) " {{{1 " Define a group of Vim file types whose tags should be stored together. let canonical_filetype = tolower(a:1) - let s:filetype_groups[canonical_filetype] = a:000[1:] - for ft in s:filetype_groups[canonical_filetype] - let s:canonical_filetypes[tolower(ft)] = canonical_filetype + let other_filetypes = map(a:000[1:], 'tolower(v:val)') + let s:filetype_groups[canonical_filetype] = other_filetypes + for ft in other_filetypes + let s:canonical_filetypes[ft] = canonical_filetype endfor endfunction -- cgit v1.2.3