Skip to content

Fuzzy find, save, and delete Vim session with fzf.vim

Notifications You must be signed in to change notification settings

kaisxu/fzf-session.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fzf-session.vim

This repo is a fork of dominickng/fzf-session with some compatiable changes of Windows and naming changes. This plugin adds support for searching, saving, and deleting Vim sessions with fzf.vim.

Features

Fuzzy search vim sessions using fzf.vim, with a single configurable location for storing all session files.

Requirements

Installation

NeoBundle:

NeoBundle 'iaalm/fzf-session.vim'

Vundle:

Plugin 'iaalm/fzf-session.vim'

vim-plug:

Plug 'iaalm/fzf-session.vim'

Configuration

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 . '.vim_session'

Usage

The commands are modelled on those of vim-ctrlp-session, as much of the implementation is the same.

:SSave {name}

Create a session called {name}. The session will be automatically tracked.

:SLoad {name}

Load session called {name}.

:SDelete {name}

Delete session called {name}.

:SQuit

Stop tracking the current active session and close all buffers.

:SList

List all available sessions.

:Sessions

Launch fzf prompt for fuzzy searching available sessions.

Mappings

You may wish to create shorter mappings to the above commands, e.g.

" Launches fzf prompt to search sessions with <leader>r.
nnoremap <leader>r :Sessions<CR>

" Starts the prompt to save a session, awaiting a name to be entered.
nnoremap <leader>s :SSave<Space>

Credits

This plugin is wholly based upon dominickng/fzf-session vim-ctrlp-session.

License

Distributed under the same terms as Vim itself. See :help license.

About

Fuzzy find, save, and delete Vim session with fzf.vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%