1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2025-12-28 01:12:34 +01:00

fixed bug with dotted filetypes

This commit is contained in:
Michael Sanders
2009-03-01 17:11:13 -05:00
parent 8f31a3b9bf
commit 3e7d478b91
14 changed files with 64 additions and 12 deletions

View File

@@ -1,10 +1,13 @@
if !exists('g:loaded_snips') || exists('s:did_'.&ft.'_snips')
let filetype = stridx(&ft, 'xhtml') > -1 ? 'xhtml' : 'html'
if !exists('g:loaded_snips') || exists('s:did_'.filetype.'_snips')
fini
en
let s:did_{&ft}_snips = 1
let s:did_{filetype}_snips = 1
let ft = &ft
let &ft = filetype
" automatically add a closing '/' to the end of xhtml tags
let c = &ft == 'xhtml' ? ' /' : ''
let c = filetype == 'xhtml' ? ' /' : ''
" Some useful Unicode entities
" Non-Breaking Space
@@ -92,3 +95,4 @@ exe 'Snipp optt <option>${1:option}</option>${2}'
exe "Snipp select <select name=\"${1:some_name}\" id=\"${2:$1}\">\n\t<option value=\"${3:option}\">${4:$3}</option>\n</select>${5}"
exe "Snipp table <table border=\"${1:0}\">\n\t<tr><th>${2:Header}</th></tr>\n\t<tr><th>${3:Data}</th></tr>\n</table>${4}"
exe 'Snipp textarea <textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">${4}</textarea>${5}'
let &ft = ft