Custom fold in vim

in my .vimrc file, I have a description for a custom javascript forger:

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 fine, except for one: when complex, I have something like:

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

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

+4
source share
1 answer

These characters are configured using the fillchars parameter, more specifically, in the fold: element of the fillchars parameter.

See :help fillchars .

+6
source

Source: https://habr.com/ru/post/1334483/


All Articles