tabasco


Ⅰ. 插件描述

Saves and loads tabs

Ⅱ. 基本信息

创建日期:  2011-08-26
使用用户:  1
Github星:  1
插件作者:  Adam Szlachta

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

----> I don't recommend this plugin anymore! See Final note.

  • Overview

Plugin tabasco.vim provides two commands for Vim tabs loading/saving:

:Tabssave [name]

Saves a list of tabs to _vim_tabasco.name file for current user (or .vim_tabasco.name for mac/unix). If name is not specified the name "default" is used.

:Tabsload [name]

Removes active tabs and loads new tabs from list in _vim_tabasco.name file like in :Tabssave.
Additionally it creates autocommand which saves list of tabs before quitting Vim (explicit using :Tabssave is not necessary after loading).

  • Additional information

The aim of this plugin is to provide functionality similar to Notepad++ (and other editors) which loads/saves tabs automatically after opening/closing editor respectively. To achieve this create following shortcut[s] (for Windows and gVim):

"C:Program FilesVimvim73gvim.exe" -c "Tabsload"
or:
"C:Program FilesVimvim73gvim.exe" -c "Tabsload name"

Using second option allows to keep a couple of shortcuts with a separate lists of tabs to work with.

  • Limitations

For now many buffers in one tab are expanded to separate tabs on load.
Tab name should be full file path or any kind of accessible path, if it just a file name and Vim is run from a different directory it will not load it properly.

  • Notes

Plugin was tested only with Vim 7.3 and Windows7 / 64bit.
Feel free to leave me suggestions and corrections or to make your own modifications.
I would like to thank Yegappan Lakshmanan for MRU plugin I was analyzing in order to learn how to write vim scripts.

  • Final note

I just found :mksession and :runtime do the same better. Following shortcuts can be used:
"C:Program FilesVimvim73gvim.exe" -c "runtime Session.vim"  -c "autocmd VimLeave * exe 'mksession!'"
or
"C:Program FilesVimvim73gvim.exe" -c "runtime sessionname.vim"  -c "autocmd VimLeave * exe 'mksession! sessionname.vim'"

添加新评论