Skip to content

Commit dcb81f3

Browse files
committed
Revert "Give "Special Methods" lower precedence"
This reverts commit 4480f1d which breaks highlighting of "include", among other methods.
1 parent e53a858 commit dcb81f3

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

‎syntax/ruby.vim‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,6 @@ if exists("ruby_operators")
3737
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop
3838
endif
3939

40-
" Special Methods
41-
if !exists("ruby_no_special_methods")
42-
syn keyword rubyAccess public protected private module_function
43-
" attr is a common variable name
44-
syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!"
45-
syn keyword rubyAttribute attr_accessor attr_reader attr_writer
46-
syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)"
47-
syn keyword rubyEval eval class_eval instance_eval module_eval
48-
syn keyword rubyException raise fail catch throw
49-
" false positive with 'include?'
50-
syn match rubyInclude "\<include\>[?!]\@!"
51-
syn keyword rubyInclude autoload extend load require
52-
syn keyword rubyKeyword callcc caller lambda proc
53-
endif
54-
5540
" Expression Substitution and Backslash Notation
5641
syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
5742
syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
@@ -266,6 +251,21 @@ else
266251
syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!"
267252
endif
268253

254+
" Special Methods
255+
if !exists("ruby_no_special_methods")
256+
syn keyword rubyAccess public protected private module_function
257+
" attr is a common variable name
258+
syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!"
259+
syn keyword rubyAttribute attr_accessor attr_reader attr_writer
260+
syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)"
261+
syn keyword rubyEval eval class_eval instance_eval module_eval
262+
syn keyword rubyException raise fail catch throw
263+
" false positive with 'include?'
264+
syn match rubyInclude "\<include\>[?!]\@!"
265+
syn keyword rubyInclude autoload extend load require
266+
syn keyword rubyKeyword callcc caller lambda proc
267+
endif
268+
269269
" Comments and Documentation
270270
syn match rubySharpBang "\%^#!.*" display
271271
syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX contained

0 commit comments

Comments
 (0)