Ⅰ. 插件描述
Simple, automatic session management for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ahri/vim-sesspit'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ahri/vim-sesspit'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ahri/vim-sesspit'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ahri/vim-sesspit
Ⅳ. 文档说明
# SessPit for Vim
Simple, automatic session management for Vim
- [x] Simple
- [x] Masterless
- [x] Sensible defaults
- [x] No dependencies
What?
It's a session manager for Vim that strives to work when you ask it to and then
get out of your way. It will drop a session file either in your current
directory, or, preferably, in a suitable project directory above your current
one that contains a project marker (configurable, but something like a .git
directory). Once a session file exists it'll keep it updated when you swap
buffers or exit Vim. That's it. Magic.
Why?
Vim includes session saving via mksession and restore via source but I
wanted to make things a bit simpler; I wanted to be able to say "this project is
worth being able to jump right back into" and for that to be easy. I wanted it
automatic but not too automatic, and I wanted it to stay out of my way as much
as possible.
How?
- Vundle
Bundle 'ahri/vim-sesspit' - vim-plug
Plug 'ahri/vim-sesspit'
Then just :SessPit to start tracking to .vimsession~.
Config?
sesspit#set_filename(".mysession") " default: ".vimsession~"
sesspit#set_sessionoptions("buffers,tabpages") " default: "buffers"
sesspit#set_project_markers(".git,.svn,MY_PROJECT_MARKER") " default: ".git"Versus
Not automatic.
Dependent on Obsession. Global session registry.
Global session registry. Heavyweight.