diff options
author | Peter Odding <peter@peterodding.com> | 2011-10-29 17:32:33 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2011-10-29 17:32:33 +0200 |
commit | e3290ab006edf7c262a0bd117577043ce33435c6 (patch) | |
tree | a67768ae63c5b8005ca4d290e00ce3a7c26c208d /autoload/xolox | |
parent | 3d7e09100e74d84a94996447e79594d3911a4c9a (diff) | |
download | vim-easytags-e3290ab006edf7c262a0bd117577043ce33435c6.tar.gz |
Make list of ignored syntax groups configurable
While trying to fix issue #20 I decided to refactor the code that
handles ignored syntax groups: Previously the list of excluded groups
was hard coded in two places, now it's a configuration option. Then
it turned out that including shFunction* in the list of excluded
syntax groups didn't fix the reported issue...
Diffstat (limited to 'autoload/xolox')
-rw-r--r-- | autoload/xolox/easytags.vim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index fa1e070..bd6cbaa 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -1,9 +1,9 @@ " Vim script " Author: Peter Odding <peter@peterodding.com> -" Last Change: October 1, 2011 +" Last Change: October 29, 2011 " URL: http://peterodding.com/code/vim/easytags/ -let g:xolox#easytags#version = '2.7' +let g:xolox#easytags#version = '2.7.1' " Public interface through (automatic) commands. {{{1 @@ -315,8 +315,9 @@ function! xolox#easytags#highlight() " {{{2 " Convert matched tags to :syntax command and execute it. call map(matches, 'xolox#misc#escape#pattern(get(v:val, "name"))') let pattern = tagkind.pattern_prefix . '\%(' . join(xolox#misc#list#unique(matches), '\|') . '\)' . tagkind.pattern_suffix - let template = 'syntax match %s /%s/ containedin=ALLBUT,.*String.*,.*Comment.*,cIncluded' - let command = printf(template, hlgroup_tagged, escape(pattern, '/')) + let template = 'syntax match %s /%s/ containedin=ALLBUT,%s' + let command = printf(template, hlgroup_tagged, escape(pattern, '/'), xolox#misc#option#get('easytags_ignored_syntax_groups')) + call xolox#misc#msg#debug("easytags.vim %s: Executing command '%s'.", g:xolox#easytags#version, command) try execute command catch /^Vim\%((\a\+)\)\=:E339/ @@ -677,6 +678,7 @@ function! s:highlight_with_python(syntax_group, tagkind) " {{{2 let context['prefix'] = get(a:tagkind, 'pattern_prefix', '') let context['suffix'] = get(a:tagkind, 'pattern_suffix', '') let context['filters'] = get(a:tagkind, 'python_filter', {}) + let context['ignoresyntax'] = xolox#misc#option#get('easytags_ignored_syntax_groups') " Call the Python function and intercept the output. try redir => commands |