Skip to content

Commit

Permalink
Last minute updates before release
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed May 6, 2007
1 parent 51fa67d commit c032902
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2007-05-06 Tim Pope <vim@tpope.info>

* doc/ft-ruby-syntax.txt: bring into sync with upstream
* ftdetect/ruby.vim: Rails extensions

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

* NEWS: update documentation for next release
Expand Down
4 changes: 2 additions & 2 deletions doc/ft-ruby-syntax.txt
@@ -1,4 +1,4 @@
RUBY *ruby.vim* *ruby-syntax*
RUBY *ruby.vim* *ft-ruby-syntax*

There are a number of options to the Ruby syntax highlighting.

Expand All @@ -16,7 +16,7 @@ scrolling backwards, which are fixed when redrawing with CTRL-L, try setting
the "ruby_minlines" variable to a value larger than 50: >
:let ruby_minlines = 100
>
<
Ideally, this value should be a number of lines large enough to embrace your
largest class or module.

Expand Down
11 changes: 7 additions & 4 deletions ftdetect/ruby.vim
@@ -1,11 +1,14 @@
" Ruby
au BufNewFile,BufRead *.rb,*.rbw,*.rjs,*.rxml,*.gem,*.gemspec set filetype=ruby
au BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec set filetype=ruby

" Ruby on Rails
au BufNewFile,BufRead *.builder,*.rxml,*.rjs set filetype=ruby

" Rakefile
au BufNewFile,BufRead [rR]akefile* set filetype=ruby
au BufNewFile,BufRead [rR]akefile,*.rake set filetype=ruby

" Rantfile
au BufNewFile,BufRead [rR]antfile,*.rant set filetype=ruby
au BufNewFile,BufRead [rR]antfile,*.rant set filetype=ruby

" eRuby
au BufNewFile,BufRead *.erb,*.rhtml set filetype=eruby
au BufNewFile,BufRead *.erb,*.rhtml set filetype=eruby
2 changes: 1 addition & 1 deletion syntax/eruby.vim
Expand Up @@ -41,7 +41,7 @@ if !exists("b:eruby_subtype") && main_syntax == 'eruby'
endif

if !exists("b:eruby_nest_level")
let b:eruby_nest_level = strlen(substitute(substitute(substitute(expand("%:t"),'@','','g'),'\c\.erb\>','@','g'),'[^@]','','g'))
let b:eruby_nest_level = strlen(substitute(substitute(substitute(expand("%:t"),'@','','g'),'\c\.\%(erb\|rhtml\)\>','@','g'),'[^@]','','g'))
endif
if !b:eruby_nest_level
let b:eruby_nest_level = 1
Expand Down

0 comments on commit c032902

Please sign in to comment.