fzf-session.vim


Ⅰ. 插件描述

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

Ⅱ. 基本信息

创建日期:  2016-02-18
使用用户:  3
Github星:  15
插件作者:  Dominick Ng

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'dominickng/fzf-session-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'dominickng/fzf-session-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'dominickng/fzf-session-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/dominickng/fzf-session.vim

Ⅳ. 文档说明

fzf-session.vim

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.

Features

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

Requirements

Installation

NeoBundle:

NeoBundle 'dominickng/fzf-session'

Vundle:

Plugin 'dominickng/fzf-session'

vim-plug:

Plug 'dominickng/fzf-session'

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 . '/tmp/vim/session'

Usage

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

:Session {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.

Default actions in the prompt:

  • <Ctrl-X>: Delete session under the cursor
  • Any other key: Open session under the cursor

Mappings

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>

Credits

This plugin is wholly based upon
vim-ctrlp-session.

License

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

添加新评论