Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

marked as duplicate by 8088, Nifle, Sathya May 3 '11 at 14:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 12 down vote accepted

To unfold all folds, use the keys


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

dublicate of this question.

share|improve this answer
In case someone is wondering how to fold all folds: zM – Jayaram Pai Oct 4 '14 at 22:03

Not the answer you're looking for? Browse other questions tagged .