views:

198

answers:

2

I use VIM as my main text editor here at work and I often have 10-15 files open at once in a couple of windows with several tabs, each of which has its own split windows. I love using VIM, but I hate having to re-do my entire set-up every time the dev server gets bounced or my machine crashes. Is there a way to get VIM to remember a setup, such as the "project" features in many IDEs? Or am I stuck having to open all the files in the same way each time?

+8  A: 

Have a look at the :mksession command.

A Session keeps the Views for all windows, plus the global settings. You can save a Session and when you restore it later the window layout looks the same. You can use a Session to quickly switch between different projects, automatically loading the files you were last working on in that project.

Greg Hewgill
Thanks very much! Exactly what I was looking for.
daveslab
+5  A: 

Check help for mksession

gonzo
Thanks for your suggestion!
daveslab