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

added a cleaner fix for hyphenated *.snippets files

This commit is contained in:
Michael Sanders
2009-03-27 13:42:37 -04:00
parent 4f093637f1
commit 35fc8dae88

View File

@@ -73,7 +73,7 @@ endf
fun! ExtractSnipsFile(file)
if !filereadable(a:file) | return | endif
let text = readfile(a:file)
let ft = substitute(fnamemodify(a:file, ':t:r'), '\(.\{-}\)-.*', '\1', '')
let ft = fnamemodify(a:file, ':t:r:s?-.*??')
let inSnip = 0
for line in text + ["\n"]
if inSnip && (line == '' || strpart(line, 0, 1) == "\t")