Rory's Blog
Home
Blog
Projects
Facebook
Google+
Github
RSS

Vim Session

07/11/15

So, I've been vaguely aware of vim sessions for a while, but only recently actually looked into what they are. And, well, they're sessions.

So, right now I could save this post environment I'm writing in by doing a simple:

:mksession ~/.vim/vim_session_blogpost.vim

And that would create a vim sourcefile in my vim settings directory. Next time I start up vim, I can just:

:source ~/.vim/vim_session_blogpost.vim

And my environment will be just as I left it including buffers, tabs, splits, etc.

I think this could end up being quite valuable when I need to switch tasks. Save the session with some sort of meaningful name, but maybe make some notes about what I was doing first, and then switch tasks. This might be a good complement to my current (work-only, but hopefully I'll start doing it for personal projects again) habit of blogging through each modular piece of a task. I could even note where I'm saving sessions in those posts, maybe.

In any case, sessions are an interesting tool to add to my vim toolbelt, and I expect interesting things to come of this addition.