aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/xolox
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2011-05-23 20:40:27 +0200
committerPeter Odding <peter@peterodding.com>2011-05-23 20:40:27 +0200
commit45e97ff1f9d0ca2201e704910d58247afa5ca9d6 (patch)
tree4f304403e43a240a414a0621926ab8a4fb224b1f /autoload/xolox
parentf980d5d303a2d1009fc8cba87791b12938ac053f (diff)
downloadvim-easytags-45e97ff1f9d0ca2201e704910d58247afa5ca9d6.tar.gz
Dynamic highlighting for Ruby source code (issue #9)
Diffstat (limited to 'autoload/xolox')
-rw-r--r--autoload/xolox/easytags.vim23
1 files changed, 22 insertions, 1 deletions
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 <peter@peterodding.com>
-" Last Change: May 6, 2011
+" Last Change: May 23, 2011
" URL: http://peterodding.com/code/vim/easytags/
let s:script = expand('<sfile>: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".