mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 01:40:05 +08:00
Fix vim lint and ummerge plugin
This commit is contained in:
parent
2c7a9342aa
commit
e9e40236d1
@ -1,28 +1,30 @@
|
||||
|
||||
|
||||
function! SpaceVim#layers#fold_by_regexp#plugins() abort
|
||||
return [
|
||||
\ ['ZSaberLv0/ZFVimFoldBlock'],
|
||||
\ ['ZSaberLv0/ZFVimFoldBlock', {'merged' : 0}],
|
||||
\ ]
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#fold_by_regexp#config() abort
|
||||
nnoremap ZB q::call ZF_FoldBlockTemplate()<cr>
|
||||
nnoremap ZF :ZFFoldBlock //<left>
|
||||
function! ZF_Plugin_ZFVimFoldBlock_comment()
|
||||
function! ZF_Plugin_ZFVimFoldBlock_comment() abort
|
||||
let expr='\(^\s*\/\/\)'
|
||||
if &filetype=='vim'
|
||||
if &filetype ==# 'vim'
|
||||
let expr.='\|\(^\s*"\)'
|
||||
endif
|
||||
if &filetype=='c' || &filetype=='cpp'
|
||||
if &filetype ==# 'c' || &filetype ==# 'cpp'
|
||||
let expr.='\|\(^\s*\(\(\/\*\)\|\(\*\)\)\)'
|
||||
endif
|
||||
if &filetype=='make'
|
||||
if &filetype ==# 'make'
|
||||
let expr.='\|\(^\s*#\)'
|
||||
endif
|
||||
let disableE2vSaved = g:ZFVimFoldBlock_disableE2v
|
||||
let g:ZFVimFoldBlock_disableE2v = 1
|
||||
call ZF_FoldBlock("/" . expr . "//")
|
||||
call ZF_FoldBlock('/' . expr . '//')
|
||||
let g:ZFVimFoldBlock_disableE2v = disableE2vSaved
|
||||
echo "comments folded"
|
||||
echo 'comments folded'
|
||||
endfunction
|
||||
nnoremap ZC :call ZF_Plugin_ZFVimFoldBlock_comment()<cr>
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user