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?
source share