Skip to content

Instantly share code, notes, and snippets.

@kan
Created December 2, 2009 10:21
Show Gist options
  • Save kan/247113 to your computer and use it in GitHub Desktop.
Save kan/247113 to your computer and use it in GitHub Desktop.
" Vim syntax file
" Language: tmt
" Maintainer: Kan Fushihara
" Installation:
" To automatilcally load this file when a .rhtml file is opened, add the
" following lines to ~/.vim/filetype.vim:
"
" augroup filetypedetect
" au! BufRead,BufNewFile *.tmt setfiletype tmt
" augroup END
"
" You will have to restart vim for this to take effect. In any case it
" is a good idea to read ":he new-filetype" so that you know what is going
" on, and why the above lines work.
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
"Source the html syntax file
ru! syntax/html.vim
"Set the filetype to html to load the html ftplugins
set ft=html
unlet b:current_syntax
"Put the perl syntax file in @perlTop
syn include @perlTop syntax/perl.vim
syn region tmtOneLiner matchgroup=tmtDelim start=#^%?\@!# end=#$# keepend containedin=ALL contains=@perlTop oneline
syn region tmtBlock matchgroup=tmtDelim start=#<%?\?# end=#%?># keepend containedin=ALL contains=@perlTop
syn region tmtExpression matchgroup=tmtDelim start=#<%?=\?# end=#%?># keepend containedin=ALL contains=@perlTop
hi link tmtDelim todo
" vim: set ts=4 sw=4:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment