Save and restore vim sessions

From raju

To create the session

:mksession! ~/x/session.vim

To open the session

gvim -S ~/x/session.vim

To store window position and size

:set sessionoptions+=winpos,resize

To set the position of window

:winpos X Y

For example, I use this to place the gvim window on a second monitor

:winpos 1920 0