title: vim getting the current value of vim foldmarker
body: <p>How do you find the value of vim variables that are set with one word commands</p>
  
  <p>such as 
  :set foldmarker={,}</p>
  
  <p>I'm writing a simple custom function for foldtext() to set a custom one line summary of the folded region</p>
  
  <p>it works great but looks funny when I open a documents with any fold marker other than what I've hard coded into the function</p>
  
  <p>here is the function</p>
  
  <pre><code>set foldtext=GetCustomFoldText()
  function GetCustomFoldText()
      let foldClose = '}'
      let foldTtl = v:foldend - v:foldstart
      return getline(v:foldstart) . ' (+) ' . foldTtl .  ' lines... ' . foldClose
  endfunction
  </code></pre>
  
  <p>which makes this:</p>
  
  <pre><code>function myAwsomeFunction()
  {
      // awsomeness here
      // awsomeness here
      // awsomeness here
  }
  </code></pre>
  
  <p>folded becomes this:</p>
  
  <pre><code>function myAwsomeFunction()
  { (+) 5 lines... }
  </code></pre>
  
  <p>Which is great until I edit a document with a different foldmarker</p>
  
  <p>I'm trying to determine foldClose dynamically from the foldmarker </p>