Ⅰ. 插件描述
Tmux-like tabs and terminal shortcutsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'danyspin97/ttab-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'danyspin97/ttab-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'danyspin97/ttab-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/danyspin97/ttab.vim
Ⅳ. 文档说明
# ttab.vim
Easily create tabs and move between them, using tmux shortcuts.
Description
This plugin tries to colm the lack of shortcuts for :term, which
have been introduced lately. ttab.vim let you create terminal buffers
in split and tabs, in the same way you would do in tmux.
It does not try to replace :split and :vsplit; instead it only
add prefixes for commands which take a lot of keystrokes
(:tabnew or :vs<CR>:term<CR>).
Installation
You can use any plugin manager to install ttab.vim.
For example, using Plug it would be:
Plug 'DanySpin97/ttab.vim'Mappings
| Mapping | Action | |
|---|---|---|
| <Prefix>n | Go to the next tab | |
| <Prefix>p | Go to the previous tab | |
| <Prefix>c | Create an empty buffer in a new tab | |
| <Prefix>t | Open a terminal in a new tab | |
| <Prefix>\ | Open a terminal in a vertical window | |
| <Prefix>- | Open a terminal in a horizontal window | |
| <Prefix>x | Close the current tab | |
| <Prefix>[0-9] | Move to the ith tab |
All the mappings work in normal mode and inside the terminal.
The default prefix is '<C-B>'.
Settings
Prefix
Change the prefix (default '<C-B>'):
let g:ttab_prefix = '<C-B>'Terminal mappings
Disable the terminal mappings:
let g:ttab_terminal_mapping = 0LICENSE
This program is licensed under the MIT license.