summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/eruby.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-28 20:54:39 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-28 20:54:39 +0200
commit1d68952a3eeb40efc5568d99d0b2dd37960975e7 (patch)
tree59c8eda2101b9544bb48b8c690ef5e1d4fcbb21a /runtime/ftplugin/eruby.vim
parent167632fcddd32656a737fa5568504fff12d04f70 (diff)
Runtime file updates.
Diffstat (limited to 'runtime/ftplugin/eruby.vim')
-rw-r--r--runtime/ftplugin/eruby.vim9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim
index 9e121c20ba..7c19a09aa3 100644
--- a/runtime/ftplugin/eruby.vim
+++ b/runtime/ftplugin/eruby.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: eRuby
-" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
-" Info: $Id: eruby.vim,v 1.12 2008/06/29 04:18:43 tpope Exp $
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2010 Apr 15
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
@@ -27,7 +27,10 @@ if !exists("b:eruby_subtype")
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == ''
- let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\)\+$','',''),'\.\zs\w\+$')
+ let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
+ endif
+ if b:eruby_subtype == ''
+ let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$')
endif
if b:eruby_subtype == 'rhtml'
let b:eruby_subtype = 'html'