comparison vendor/vim-syntax/eruby.vim @ 595:0e72765944d4

Update vendors
author nanaya <me@myconan.net>
date Wed, 22 Mar 2017 00:27:53 +0900
parents bbcffc594d1e
children 0f0bdbd8d37d
comparison
equal deleted inserted replaced
594:2ac0fa5ba73c 595:0e72765944d4
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'