A code is over 2 000 lines full of folds. I select a certain block in Visual mode to which I would like to start writing. However, things around, such as folds, hinter my writing, and I accidentally tend to modify them. Currently, I avoid such mistakes by writing the block in a separate VIM. It is not a real solution, and it gets awkward with too many VIMs open. How can I hide everything except the block in folds?
+1
A:
You can do zMzv
or zMzO
.
zM
closes all folds, zv
makes current line visible and zO
opens all folds under cursor recursively up to root.
Paul
2009-03-23 19:12:53