Wednesday, February 27, 2008


Say you're editing in Vim and wrapping it up for the day. You have everything configured to your liking and don't want to go through the hassle of setting everything up tomorrow. Vim allows you to very easily store your current editing session like so:

:mksession work.vim

After that you can quit Vim and come back whenever you want. Once you're back inside Vim, you can type:

:source work.vim

and your last editing session is reloaded. You can also load a session from the command-line like so:

vim -S work.vim


Unknown said...

I just wanted to thank you for these tips and this blog. I am working much more efficiently with Vim now. (I particularly loved this session tip -- why didn't I know this already?)

Travis Whitton said...

Glad you like the blog! I'll keep the tips coming. Thanks for dropping by -- Travis

Anonymous said...

awesome session tip dude!!