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:
@@ -73,7 +73,7 @@ endf
|
|||||||
fun! ExtractSnipsFile(file)
|
fun! ExtractSnipsFile(file)
|
||||||
if !filereadable(a:file) | return | endif
|
if !filereadable(a:file) | return | endif
|
||||||
let text = readfile(a:file)
|
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
|
let inSnip = 0
|
||||||
for line in text + ["\n"]
|
for line in text + ["\n"]
|
||||||
if inSnip && (line == '' || strpart(line, 0, 1) == "\t")
|
if inSnip && (line == '' || strpart(line, 0, 1) == "\t")
|
||||||
|
|||||||
Reference in New Issue
Block a user