This simple extension for CtrlP enables the following:
- global directory to store vim session files
- another global directory to store custom configurations for those vim sessions
- CtrlP frontend and the command SaveSesh for basic session manipulation
With vim-plug
- Just add the usual
Plug "eiyashou/ctrlp-sesh.vim"to your .vimrc/init.vim - add
sessionstog:ctrlp_extensionsin order to enable this extension. - map something to
:CtrlPOpenSeshand optionally to:SaveSesh.
CtrlPOpenSesh- shows a list of files in your session directory; choosing a file and hitting enter will execute:wall, close all current buffers and source chosen session replacing all currently open buffersCtrlPRenameSesh- shows a list of sessions and allows you to rename one, alongside its configuration fileCtrlPDeleteSesh- shows a list of sessions and allows you to delete one, alongside its configuration fileSaveSesh- 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_seshdir
g:ctrlp_seshdir - 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