mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-07 19:24:27 +08:00
css comment.
This commit is contained in:
@@ -1483,6 +1483,21 @@ EOF
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:zen_toggleComment()
|
function! s:zen_toggleComment()
|
||||||
|
if s:zen_getFileType() == 'css'
|
||||||
|
let line = getline('.')
|
||||||
|
let mx = '^\(\s*\)/\*\s*\(.*\)\s*\*/\s*$'
|
||||||
|
if line =~ mx
|
||||||
|
let space = substitute(matchstr(line, mx), mx, '\1', '')
|
||||||
|
let line = substitute(matchstr(line, mx), mx, '\2', '')
|
||||||
|
let line = space . substitute(line, '^\s*\|\s*$', '\1', 'g')
|
||||||
|
else
|
||||||
|
let mx = '^\(\s*\)\(.*\)\s*$'
|
||||||
|
let line = substitute(line, mx, '\1/* \2 */', '')
|
||||||
|
endif
|
||||||
|
call setline('.', line)
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
let curpos = getpos('.')
|
let curpos = getpos('.')
|
||||||
while 1
|
while 1
|
||||||
let mx = '<\(/\{0,1}[a-zA-Z][a-zA-Z0-9]*\)[^>]*>'
|
let mx = '<\(/\{0,1}[a-zA-Z][a-zA-Z0-9]*\)[^>]*>'
|
||||||
|
|||||||
Reference in New Issue
Block a user