Friday, April 1, 2016

Re: Open All Folds When Opening a File

On 2016-04-01, goldhexter wrote:
> Hello all,
>
> I've used VIM for basic editing, but am new to using it as a full
> fledged development environment. Much of my coding is via Python
> so I've installed the SimpylFold plugin via Vundle. All is fine, I
> can unfold and fold using the "z" options. However, what I'd like
> to do is always have a python file unfolded completely upon
> initial opening (or even better would be to save state if that is
> possible). I.e. have VIM automatically execute a "zM" each time a
> file is opened.
>
> Is there any straightforward way to do the above (am really a
> newbie at this at the moment).

To always start editing with all folds open, put this in your
~/.vimrc:

set foldlevelstart=99

See

:help 'foldlevelstart'
:help fold-foldlevel

If you want to open only Python files will all folds open, put this
in a file with the path name ~/.vim/after/ftplugin/python.vim:

set foldlevel=99

See

:help 'foldlevel'
:help 28.5

Regards,
Gary

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: