From 45e97ff1f9d0ca2201e704910d58247afa5ca9d6 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Mon, 23 May 2011 20:40:27 +0200 Subject: Dynamic highlighting for Ruby source code (issue #9) --- autoload/xolox/easytags.vim | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'autoload/xolox') diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 9ed06ec..b5c8b5a 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -1,6 +1,6 @@ " Vim script " Author: Peter Odding -" Last Change: May 6, 2011 +" Last Change: May 23, 2011 " URL: http://peterodding.com/code/vim/easytags/ let s:script = expand(':p:~') @@ -628,6 +628,27 @@ call xolox#easytags#define_tagkind({ highlight def link csClass Identifier highlight def link csMethod Function +" Ruby. {{{2 + +call xolox#easytags#define_tagkind({ + \ 'filetype': 'ruby', + \ 'hlgroup': 'rubyModuleName', + \ 'filter': 'get(v:val, "kind") ==# "m"'}) + +call xolox#easytags#define_tagkind({ + \ 'filetype': 'ruby', + \ 'hlgroup': 'rubyClassName', + \ 'filter': 'get(v:val, "kind") ==# "c"'}) + +call xolox#easytags#define_tagkind({ + \ 'filetype': 'ruby', + \ 'hlgroup': 'rubyMethodName', + \ 'filter': 'get(v:val, "kind") =~# "[fF]"'}) + +highlight def link rubyModuleName Type +highlight def link rubyClassName Type +highlight def link rubyMethodName Function + " }}} " Restore "cpoptions". -- cgit v1.2.3