문제

in my .vimrc file, I have the follwing for custom folding javascript:

function! JavaScriptFold()
    setl foldmethod=syntax
    setl foldlevelstart=1
    syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend

    function! FoldText()
        return substitute(getline(v:foldstart), '{.*', '{...}', '')
    endfunction
    setl foldtext=FoldText()
endfunction
au FileType javascript call JavaScriptFold()
au FileType javascript setl fen

It works great except for one thing: when folded, I have something like:

function hello(){...]-----------------------------------------------------------

My question is: how to get rid of the '----' that goes to the end of the line ?

도움이 되었습니까?

해결책

Those characters are configured via the fillchars option, more specifically the fold: item of the fillchars option.

See :help fillchars for more info.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top