Skip to content

Commit

Permalink
Module syntax match change; detect irbrc
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed May 22, 2007
1 parent 1907c29 commit 2f145d4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2007-05-22 Tim Pope <vim@tpope.info>

* syntax/ruby.vim: made module declaration match mirror class
declaration match
* ftdetect/ruby.vim: added .irbrc

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

* syntax/ruby.vim: revert from using TOP to ALLBUT

2007-05-15 Tim Pope <vim@tpope.info>

* syntax/eruby.vim: handle %%> properly
Expand Down
3 changes: 3 additions & 0 deletions ftdetect/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ au BufNewFile,BufRead [rR]akefile,*.rake set filetype=ruby
" Rantfile
au BufNewFile,BufRead [rR]antfile,*.rant set filetype=ruby

" IRB config
au BufNewFile,BufRead .irbrc set filetype=ruby

" eRuby
au BufNewFile,BufRead *.erb,*.rhtml set filetype=eruby
2 changes: 1 addition & 1 deletion syntax/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rub
syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable
syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant
syn match rubyModuleDeclaration "[^[:space:];#]\+" contained contains=rubyConstant
syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant
syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:].:?!=]\@!" contained containedin=rubyMethodDeclaration
syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration
Expand Down

0 comments on commit 2f145d4

Please sign in to comment.