mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-06 10:44:24 +08:00
Fix next item in CSS
This commit is contained in:
@@ -380,7 +380,7 @@ function! emmet#getFileType(...) abort
|
||||
endif
|
||||
|
||||
let pos = emmet#util#getcurpos()
|
||||
let type = synIDattr(synID(pos[1], pos[2], 1), 'name')
|
||||
let type = synIDattr(synID(max([pos[1], 1]), max([pos[2], 1]), 1), 'name')
|
||||
|
||||
" ignore htmlTagName as it seems to occur too often
|
||||
if type == 'htmlTagName'
|
||||
|
||||
@@ -296,7 +296,9 @@ function! emmet#lang#css#toggleComment() abort
|
||||
let line = substitute(matchstr(line, mx), mx, '\2', '')
|
||||
let line = space . substitute(line, '^\s*\|\s*$', '\1', 'g')
|
||||
else
|
||||
let mx = '^\(\s*\)\(.*\)\s*$'
|
||||
let mx = '^\(\s*\)\(''[^'']*''\|[^'']*\|;\)\s*$'
|
||||
" TODO multi-property
|
||||
"let mx = '^\(\s*\)\(\%(''[^'']*''\|[^'';]\+\)*;\{0,1}\)'
|
||||
let line = substitute(line, mx, '\1/* \2 */', '')
|
||||
endif
|
||||
call setline('.', line)
|
||||
@@ -352,13 +354,8 @@ function! emmet#lang#css#moveNextPrevItem(flag) abort
|
||||
endfunction
|
||||
|
||||
function! emmet#lang#css#moveNextPrev(flag) abort
|
||||
let pos = search('""\|()\|\(:\s*\zs$\)', a:flag ? 'Wbp' : 'Wp')
|
||||
if pos == 2
|
||||
startinsert!
|
||||
else
|
||||
silent! normal! l
|
||||
startinsert
|
||||
endif
|
||||
call search('""\|()\|\(:\s*\zs;\{1,0}$\)', a:flag ? 'Wbp' : 'Wp')
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! emmet#lang#css#splitJoinTag() abort
|
||||
|
||||
Reference in New Issue
Block a user