On 2015-02-09 20:25, Bao Niu wrote:
> 
> I know in normal mode typing in:
> 
>  set foldmethod? 
> 
> can print the current buffer's foldmethod to the status line, but
> is there a function/variable that I can derive this value
> programmatically in my script? Thanks.

  :let current_fold_method=&foldmethod

which you can then restore with

  :let &foldmethod=current_fold_method

where "current_fold_method" is some variable-name you want

-tim



-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to