mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 03:50:04 +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
|
function! SpaceVim#layers#fold_by_regexp#plugins() abort
|
||||||
return [
|
return [
|
||||||
\ ['ZSaberLv0/ZFVimFoldBlock'],
|
\ ['ZSaberLv0/ZFVimFoldBlock', {'merged' : 0}],
|
||||||
\ ]
|
\ ]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#layers#fold_by_regexp#config() abort
|
function! SpaceVim#layers#fold_by_regexp#config() abort
|
||||||
nnoremap ZB q::call ZF_FoldBlockTemplate()<cr>
|
nnoremap ZB q::call ZF_FoldBlockTemplate()<cr>
|
||||||
nnoremap ZF :ZFFoldBlock //<left>
|
nnoremap ZF :ZFFoldBlock //<left>
|
||||||
function! ZF_Plugin_ZFVimFoldBlock_comment()
|
function! ZF_Plugin_ZFVimFoldBlock_comment() abort
|
||||||
let expr='\(^\s*\/\/\)'
|
let expr='\(^\s*\/\/\)'
|
||||||
if &filetype=='vim'
|
if &filetype ==# 'vim'
|
||||||
let expr.='\|\(^\s*"\)'
|
let expr.='\|\(^\s*"\)'
|
||||||
endif
|
endif
|
||||||
if &filetype=='c' || &filetype=='cpp'
|
if &filetype ==# 'c' || &filetype ==# 'cpp'
|
||||||
let expr.='\|\(^\s*\(\(\/\*\)\|\(\*\)\)\)'
|
let expr.='\|\(^\s*\(\(\/\*\)\|\(\*\)\)\)'
|
||||||
endif
|
endif
|
||||||
if &filetype=='make'
|
if &filetype ==# 'make'
|
||||||
let expr.='\|\(^\s*#\)'
|
let expr.='\|\(^\s*#\)'
|
||||||
endif
|
endif
|
||||||
let disableE2vSaved = g:ZFVimFoldBlock_disableE2v
|
let disableE2vSaved = g:ZFVimFoldBlock_disableE2v
|
||||||
let g:ZFVimFoldBlock_disableE2v = 1
|
let g:ZFVimFoldBlock_disableE2v = 1
|
||||||
call ZF_FoldBlock("/" . expr . "//")
|
call ZF_FoldBlock('/' . expr . '//')
|
||||||
let g:ZFVimFoldBlock_disableE2v = disableE2vSaved
|
let g:ZFVimFoldBlock_disableE2v = disableE2vSaved
|
||||||
echo "comments folded"
|
echo 'comments folded'
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap ZC :call ZF_Plugin_ZFVimFoldBlock_comment()<cr>
|
nnoremap ZC :call ZF_Plugin_ZFVimFoldBlock_comment()<cr>
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user