FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

allow comments to be highlighted directly after module/class/method d… · sofaking/vim-ruby@7e5aa7d · GitHub

Commit 7e5aa7d

Browse files
committed
allow comments to be highlighted directly after module/class/method definitions
1 parent cfc4177 commit 7e5aa7d

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎ChangeLog‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2005-09-25 Doug Kearns <djkea2@gus.gscit.monash.edu.au>
2+
3+
* syntax/ruby.vim: allow comments to be highlighted directly after
4+
module/class/method definitions without intervening whitespace
5+
16
2005-09-24 Doug Kearns <djkea2@gus.gscit.monash.edu.au>
27

38
* syntax/ruby.vim: allow regexp's as hash values and after a ';'

‎syntax/ruby.vim‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ end
144144

145145
" Expensive Mode - colorize *end* according to opening statement
146146
if !exists("ruby_no_expensive")
147-
syn region rubyFunction matchgroup=rubyDefine start="\<def\s\+" end="\ze\%(\s\|(\|;\|$\)" oneline
148-
syn region rubyClass matchgroup=rubyDefine start="\<class\s\+" end="\ze\%(\s\|<\|;\|$\)" oneline
147+
syn region rubyFunction matchgroup=rubyDefine start="\<def\s\+" end="\%(\s*\%(\s\|(\|;\|$\|#\)\)\@=" oneline
148+
syn region rubyClass matchgroup=rubyDefine start="\<class\s\+" end="\%(\s*\%(\s\|<\|;\|$\|#\)\)\@=" oneline
149149
syn match rubyDefine "\<class\ze<<"
150-
syn region rubyModule matchgroup=rubyDefine start="\<module\s\+" end="\ze\%(\s\|;\|$\)" oneline
150+
syn region rubyModule matchgroup=rubyDefine start="\<module\s\+" end="\%(\s*\%(\s\|;\|$\|#\)\)\@=" oneline
151151

152152
syn region rubyBlock start="\<def\>" matchgroup=rubyDefine end="\<end\>" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo nextgroup=rubyFunction fold
153153
syn region rubyBlock start="\<class\>" matchgroup=rubyDefine end="\<end\>" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo nextgroup=rubyClass fold

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL