Add fuzzy search for css. Fixes #142

This commit is contained in:
mattn
2013-08-14 13:04:39 +09:00
parent 49d2c8280f
commit 61360ddfdc
3 changed files with 39 additions and 22 deletions

View File

@@ -107,15 +107,18 @@ function! emmet#lang#html#parseIntoTree(abbr, type)
" snippets
let snippets = emmet#getResource(type, 'snippets', {})
if !empty(snippets) && has_key(snippets, tag_name)
let snippet = snippets[tag_name]
if use_pipe_for_cursor
let snippet = substitute(snippet, '|', '${cursor}', 'g')
if !empty(snippets)
let snippet_name = tag_name
if has_key(snippets, snippet_name)
let snippet = snippets[snippet_name]
if use_pipe_for_cursor
let snippet = substitute(snippet, '|', '${cursor}', 'g')
endif
let lines = split(snippet, "\n")
call map(lines, 'substitute(v:val, "\\( \\|\\t\\)", escape(indent, "\\\\"), "g")')
let current.snippet = join(lines, "\n")
let current.name = ''
endif
let lines = split(snippet, "\n")
call map(lines, 'substitute(v:val, "\\( \\|\\t\\)", escape(indent, "\\\\"), "g")')
let current.snippet = join(lines, "\n")
let current.name = ''
endif
let custom_expands = emmet#getResource(type, 'custom_expands', {})