mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-07 19:24:27 +08:00
find autoload/zencoding/lang/xxx.vim
This commit is contained in:
@@ -50,7 +50,7 @@ endfunction
|
|||||||
function! zencoding#parseIntoTree(abbr, type)
|
function! zencoding#parseIntoTree(abbr, type)
|
||||||
let abbr = a:abbr
|
let abbr = a:abbr
|
||||||
let type = a:type
|
let type = a:type
|
||||||
let rtype = len(globpath(&rtp, 'autoload/zencoding/'.type.'.vim')) ? type : 'html'
|
let rtype = len(globpath(&rtp, 'autoload/zencoding/lang/'.type.'.vim')) ? type : 'html'
|
||||||
return zencoding#lang#{rtype}#parseIntoTree(abbr, type)
|
return zencoding#lang#{rtype}#parseIntoTree(abbr, type)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ function! zencoding#toString(...)
|
|||||||
let use_pipe_for_cursor = zencoding#getResource(type, 'use_pipe_for_cursor', 1)
|
let use_pipe_for_cursor = zencoding#getResource(type, 'use_pipe_for_cursor', 1)
|
||||||
while itemno < current.multiplier
|
while itemno < current.multiplier
|
||||||
if len(current.name)
|
if len(current.name)
|
||||||
let rtype = len(globpath(&rtp, 'autoload/zencoding/'.type.'.vim')) ? type : 'html'
|
let rtype = len(globpath(&rtp, 'autoload/zencoding/lang/'.type.'.vim')) ? type : 'html'
|
||||||
let inner = zencoding#lang#{rtype}#toString(s:zen_settings, current, type, inline, filters, itemno, indent)
|
let inner = zencoding#lang#{rtype}#toString(s:zen_settings, current, type, inline, filters, itemno, indent)
|
||||||
if current.multiplier > 1
|
if current.multiplier > 1
|
||||||
let inner = substitute(inner, '\$#', '$line'.(itemno+1).'$', 'g')
|
let inner = substitute(inner, '\$#', '$line'.(itemno+1).'$', 'g')
|
||||||
@@ -339,15 +339,8 @@ function! zencoding#expandAbbr(mode) range
|
|||||||
let part = matchstr(line, '\([a-zA-Z0-9:_\-\@|]\+\)$')
|
let part = matchstr(line, '\([a-zA-Z0-9:_\-\@|]\+\)$')
|
||||||
else
|
else
|
||||||
let part = matchstr(line, '\(\S.*\)$')
|
let part = matchstr(line, '\(\S.*\)$')
|
||||||
if zencoding#isExtends(type, "html")
|
let rtype = len(globpath(&rtp, 'autoload/zencoding/lang/'.type.'.vim')) ? type : 'html'
|
||||||
while part =~ '<.\{-}>'
|
let part = zencoding#lang#{rtype}#findTokens(part)
|
||||||
let part = substitute(part, '^.*<.\{-}>', '', '')
|
|
||||||
endwhile
|
|
||||||
let rtype = len(globpath(&rtp, 'autoload/zencoding/'.type.'.vim')) ? type : 'html'
|
|
||||||
let part = zencoding#lang#{rtype}#findTokens(part)
|
|
||||||
elseif zencoding#isExtends(type, "css")
|
|
||||||
let part = substitute(part, '^.*[;{]\s*', '', '')
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
let rest = getline('.')[len(line):]
|
let rest = getline('.')[len(line):]
|
||||||
let str = part
|
let str = part
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
function! zencoding#lang#css#findTokens(str)
|
function! zencoding#lang#css#findTokens(str)
|
||||||
|
echo "fooooooooo"
|
||||||
|
echo getchar()
|
||||||
return substitute(a:str, '^.*[;{]\s*', '', '')
|
return substitute(a:str, '^.*[;{]\s*', '', '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ let s:mx = '\([+>]\|<\+\)\{-}\s*\((*\)\{-}\s*\([@#.]\{-}[a-zA-Z\!][a-zA-Z0-9:_\!
|
|||||||
function! zencoding#lang#html#findTokens(str)
|
function! zencoding#lang#html#findTokens(str)
|
||||||
let str = a:str
|
let str = a:str
|
||||||
let [pos, last_pos] = [0, 0]
|
let [pos, last_pos] = [0, 0]
|
||||||
|
while str =~ '<.\{-}>'
|
||||||
|
let str = substitute(str, '^.*<.\{-}>', '', '')
|
||||||
|
endwhile
|
||||||
while len(str) > 0
|
while len(str) > 0
|
||||||
let token = matchstr(str, s:mx, pos)
|
let token = matchstr(str, s:mx, pos)
|
||||||
if token == ''
|
if token == ''
|
||||||
|
|||||||
Reference in New Issue
Block a user