sessionman.vim 1.04

sessionman.vim is a Vim session manager.

  Add it to your Download Basket!

 Add it to your Watch List!


Rate it!
send us
an update
GPL (GNU General Public License) 
3.5/5 18
Yuri Klubakov
ROOT \ Text Editing&Processing \ Others
sessionman.vim is a Vim session manager. Vim provides a ':mksession' command to save the current editing session. This plug-in helps to work with Vim sessions by keeping them in the dedicated location and by providing commands to list all sessions, open session, open last session, close session and save session. From a list of sessions you can open session and delete session. Please note that session name can contain spaces and does not have to have a .vim extension.

On Unix sessions are saved in:


If this directory does not exist, it will be created by the :SessionSave command (requires Vim 7).

:SessionList command creates a new window with session names. Status line shows normal mode mappings:

< ESC > or 'q' - wipe the buffer
< CR > or < 2-LeftMouse > or 'o' - open session
'd' - delete session

The name of an opened session is saved in g:LAST_SESSION variable which is saved in the viminfo file if 'viminfo' option contains '!'. It is used to open last session by :SessionOpenLast command. It can be done when Vim starts (gvim +bd -c OpenLastSession) or any time during a Vim session. When session is opened and 'cscope' is enabled, script calls 'cscope add' for the current directory so make sure it is set correctly for the session.

:SessionOpen command takes a session name as an argument. It supports argument completion.

:SessionOpenLast command opens the g:LAST_SESSION session (see above).

:SessionClose command wipes out all buffers, kills cscope and clears variables with session name.

:SessionSave command saves the current editing session. If v:this_session is empty it asks for a session name.

:SessionSaveAs command takes a session name as an optional argument. If there is no argument or it is empty, it asks for a session name (default is the last part of v:this_session).

If 'sessionman_save_on_exit != 0' (default) then the current editing session will be automatically saved when you exit Vim.

Plug-in creates a "Sessions" sub-menu under the "File" menu.


· Vim


Download and copy sessionman.vim to $HOME/.vim/plugin (Unix) or $HOME/vimfiles/plugin (Windows) or $VIM/vimfiles/plugin (both) directory.

What's New in This Release:

· Added ability to edit session file (can be useful if you moved files to a different location) and extra session script (see description).
· Added :SessionShowLast command that shows the content of the g:LAST_SESSION and v:this_session variables.
· Added test if session list window is already displayed and switch to it if it is.
· Show help at the top of the session list window instead of the status line (with Erik Falor)

Last updated on June 23rd, 2008

#session manager #vim plugin #vim script #Vim #plugin #script #session

Add your review!