This simple extension for CtrlP enables the following:
- global dir to store vim session files
- CtrlPSessions command to source a session from abovementioned dir
- MkS command to save or create a new session to abovementioned dir
With pathogen:
git submodule add https://github.com/pielgrzym/ctrlp-sessions.git bundle/ctrlp-sessions- add
sessionstog:ctrlp_extensions- if you haven't got any other extensions just addlet g:ctrlp_extensions = ['sessions']to your.vimrc - map something to
:CtrlPSessionsand optionally to:MkS
CtrlPSessions- shows a list of files in your session directory; choosing a file and hitting enter will execute:walland source chosen session replacing all currently open buffersMkS- if a session is already opened it will just overwrite it's file like:mks! <path to session files>would do, otherwise it will ask for session name and create a session file ing:ctrlp_session_dir
g:ctrlp_session_dir - directory relative to user $HOME dir that will hold the session files. Default value is: .vimsessions, which points to ~/.vimsessions.
- works only on Linux (hardcoded
lsusage, sorry Windoze) - expects all the files in the session directory to be session files not dirs
- no docs