From 29ce86959acb317bdc3c778ee2a4223d339169c8 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Tue, 21 Oct 2014 20:29:59 +0200 Subject: Bug fix for xolox#easytags#define_tagkind() invocations It should be given a canonical file type and since I just changed the canonical file type for C to be C++ the invocations should be updated as well. This should really have been part of the change set with id 9b6e7d125c660f31091f59b52de9b1e425cbcb64. That's what I get for not testing properly... See also issue #91 on GitHub: https://github.com/xolox/vim-easytags/issues/91 --- autoload/xolox/easytags.vim | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 9441671..9874783 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.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/ let g:xolox#easytags#version = '3.8' @@ -293,7 +293,6 @@ function! xolox#easytags#highlight() " {{{2 " TODO This is a mess; Re-implement Python version in Vim script, benchmark, remove Python version. try call g:xolox#easytags#highlight_timer.start() - " Treat C++ and Objective-C as plain C. let filetype = xolox#easytags#filetypes#canonicalize(&filetype) let tagkinds = get(s:tagkinds, filetype, []) if exists('g:syntax_on') && !empty(tagkinds) && !exists('b:easytags_nohl') @@ -634,25 +633,28 @@ call xolox#easytags#define_tagkind({ \ 'hlgroup': 'luaFunc', \ 'tagkinds': 'f'}) -" C. {{{2 +" C and C++. {{{2 +" +" C and C++ are both treated as C++, for details refer +" to https://github.com/xolox/vim-easytags/issues/91. call xolox#easytags#define_tagkind({ - \ 'filetype': 'c', + \ 'filetype': 'cpp', \ 'hlgroup': 'cType', \ 'tagkinds': '[cgstu]'}) call xolox#easytags#define_tagkind({ - \ 'filetype': 'c', + \ 'filetype': 'cpp', \ 'hlgroup': 'cEnum', \ 'tagkinds': 'e'}) call xolox#easytags#define_tagkind({ - \ 'filetype': 'c', + \ 'filetype': 'cpp', \ 'hlgroup': 'cPreProc', \ 'tagkinds': 'd'}) call xolox#easytags#define_tagkind({ - \ 'filetype': 'c', + \ 'filetype': 'cpp', \ 'hlgroup': 'cFunction', \ 'tagkinds': '[fp]'}) @@ -661,7 +663,7 @@ highlight def link cFunction Function if xolox#misc#option#get('easytags_include_members', 0) call xolox#easytags#define_tagkind({ - \ 'filetype': 'c', + \ 'filetype': 'cpp', \ 'hlgroup': 'cMember', \ 'tagkinds': 'm'}) highlight def link cMember Identifier -- cgit v1.2.3