Mercurial > vim
comparison runtime/syntax/eruby.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | a5352e73dc00 |
children | f0f06837a699 |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
20 let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') | 20 let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') |
21 elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' | 21 elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' |
22 let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") | 22 let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") |
23 let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') | 23 let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') |
24 if b:eruby_subtype == '' | 24 if b:eruby_subtype == '' |
25 let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') | 25 let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') |
26 endif | 26 endif |
27 if b:eruby_subtype == 'rhtml' | 27 if b:eruby_subtype == 'rhtml' |
28 let b:eruby_subtype = 'html' | 28 let b:eruby_subtype = 'html' |
29 elseif b:eruby_subtype == 'rb' | 29 elseif b:eruby_subtype == 'rb' |
30 let b:eruby_subtype = 'ruby' | 30 let b:eruby_subtype = 'ruby' |