This plugin adds support for searching, saving, and deleting Vim sessions with fzf.vim. Heavily inspired by vim-ctrlp-session, which adds session management to ctrlp.vim.
Fuzzy search vim sessions using fzf.vim, with a single configurable location for storing all session files.
NeoBundle 'dominickng/fzf-session.vim'
Plugin 'dominickng/fzf-session.vim'
Plug 'dominickng/fzf-session.vim'
There is one configurable option: the directory to store the session files. If not set, the plugin will use the containing directory of the current open file when a session is created.
let g:fzf_session_path = $HOME . '/tmp/vim/session'
The commands are modelled on those of vim-ctrlp-session, as much of the implementation is the same.
Create a session called {name}
. The session will be automatically tracked.
Load session called {name}
.
Delete session called {name}
.
Stop tracking the current active session and close all buffers.
List all available sessions.
Launch fzf prompt for fuzzy searching available sessions.
Default actions in the prompt:
<Ctrl-X>
: Delete session under the cursor- Any other key: Open session under the cursor
You may wish to create shorter mappings to the above commands, e.g.
" Launches fzf prompt to search sessions with <leader>l.
nnoremap <leader>l :Sessions<CR>
" Starts the prompt to save a session, awaiting a name to be entered.
nnoremap <leader>s :Session<Space>
This plugin is wholly based upon vim-ctrlp-session.
Distributed under the same terms as Vim itself. See :help license
.