Skip to content

Commit

Permalink
Highlight undef like def
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Jul 30, 2007
1 parent 29265c0 commit 89004ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2007-07-30 Tim Pope <vim@tpope.info>

* syntax/ruby.vim: highlight undef like def

2007-07-16 Tim Pope <vim@tpope.info>

* indent/ruby.vim: prevent symbols like :for from indenting
Expand Down
5 changes: 3 additions & 2 deletions syntax/ruby.vim
Expand Up @@ -174,6 +174,7 @@ syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,
if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl
syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
syn match rubyDefine "\<undef\>" nextgroup=rubyFunction skipwhite skipnl
syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl
syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
syn region rubyBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold
Expand Down Expand Up @@ -211,15 +212,15 @@ else
syn match rubyControl "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl
syn match rubyControl "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
syn keyword rubyControl case begin do for if unless while until else elsif then when end
syn keyword rubyKeyword alias
syn keyword rubyKeyword alias undef
endif

" Keywords
" Note: the following keywords have already been defined:
" begin case class def do end for if module unless until while
syn keyword rubyControl and break ensure in next not or redo rescue retry return
syn match rubyOperator "\<defined?" display
syn keyword rubyKeyword super undef yield
syn keyword rubyKeyword super yield
syn keyword rubyBoolean true false
syn keyword rubyPseudoVariable nil self __FILE__ __LINE__
syn keyword rubyBeginEnd BEGIN END
Expand Down

0 comments on commit 89004ca

Please sign in to comment.