Ⅰ. 插件描述
CtrlP extension to manage your vim sessionsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'pielgrzym/ctrlp-sessions'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'pielgrzym/ctrlp-sessions'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'pielgrzym/ctrlp-sessions'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/pielgrzym/ctrlp-sessions
Ⅳ. 文档说明
CtrlPSessions - manage your sessions
What is it?
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
Installation
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
Commands
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
Settings
g:ctrlp_session_dir - directory relative to user $HOME dir that will hold the session files. Default value is: .vimsessions, which points to ~/.vimsessions.
Bugs/Limitations
- works only on Linux (hardcoded
lsusage, sorry Windoze) - expects all the files in the session directory to be session files not dirs
- no docs