How do you find the value of vim variables that are set with a single command word
such as: set foldmarker = {,}
I am writing a simple custom function for foldtext () to set a custom summary of one line of a folded area
it works fine, but it looks funny when I open documents with any marker token other than what I hard-coded in the function
here is the function
set foldtext=GetCustomFoldText()
function GetCustomFoldText()
let foldClose = '}'
let foldTtl = v:foldend - v:foldstart
return getline(v:foldstart) . ' (+) ' . foldTtl . ' lines... ' . foldClose
endfunction
what does it do:
function myAwsomeFunction()
{
}
folded becomes:
function myAwsomeFunction()
{ (+) 5 lines... }
It's great until I edit the document with another slogan.
I am trying to determine foldClose dynamically from foldmarker
source
share