How to make Vim not fold everything automatically? [duplicate]
Possible Duplicate:
vim: enable folds but don't automatically close them
Whenever I open Vim, it automatically folds everything. So the first thing I invariably do is to unfold everything.
Is there a way to automate this?
To unfold all folds, use the keys
zR
In order to adjust the initial fold level, play around with the foldlevel
, e.g.
:set foldlevel=1
will open all the highest level folds, a very high number will thus open all folds. Find out which level 1, 2, 3, ...
is the one you want.
To make this static, edit your ~/.vimrc
and add:
set foldlevelstart=1
duplicate of this question.