vim 101 : tip 1

Monday, December 20, 2010

Normally I use vim with multiple splits and tabs. Once I quit vim, I have to open them up all again, and remember which file (and the location in the file) I was editing before I quit.

Here is trick:
Before quitting vim, just run ":mksession" (if you have multiple tabs open, then in just one of them). And then quit.

Next time you are in the same folder, and want to open the same session just run the command "gvim -S"

The contexts are stored in session.vim. So if you want to overwrite it at some later point of time run the command with an override ":mksession!"

0 comments: