Skip to content

Commit

Permalink
Add liquid template support
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Feb 27, 2010
1 parent 644c62a commit 09344f2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugin/ragtag.vim
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if has("autocmd")
augroup ragtag
autocmd!
autocmd FileType *html*,wml,xml,xslt,xsd,jsp call s:Init()
autocmd FileType php,asp*,cf,mason,eruby call s:Init()
autocmd FileType php,asp*,cf,mason,eruby,liquid call s:Init()
if version >= 700
autocmd InsertLeave * call s:Leave()
endif
Expand Down Expand Up @@ -81,9 +81,11 @@ function! s:Init()
if !exists("b:surround_101")
let b:surround_101 = "[% \r %]\n[% END %]"
endif
elseif &ft =~ "django"
inoremap <buffer> <C-X><Lt> {{
inoremap <buffer> <C-X>> }}
elseif &ft =~ "django" || &ft == "liquid"
inoremap <buffer> <SID>ragtagOopen {{<Space>
inoremap <buffer> <SID>ragtagOclose <Space>}}<Left><Left>
inoremap <buffer> <C-X><Lt> {%
inoremap <buffer> <C-X>> %}
let b:surround_45 = "{% \r %}"
let b:surround_61 = "{{ \r }}"
elseif &ft == "mason"
Expand Down

0 comments on commit 09344f2

Please sign in to comment.