vim-tmuxlike


Ⅰ. 插件描述

A vim plugin that mimics the actions of tmux. 一个不符合人类需求的vim插件,用来模仿tmux功能

Ⅱ. 基本信息

创建日期:  2018-06-05
使用用户:  2
Github星:  20
插件作者:  Karmenzind

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-tmuxlike
Add tmux operating habits to vim.

If you are quite addicted to tmux, you might need this plugin to make your vim work a bit like tmux.

current status: STABLE

Many new features are being developed.

TOC

<!-- vim-markdown-toc GFM -->

<!-- vim-markdown-toc -->

Installation

  • use vim-plug:

    Plug 'karmenzind/vim-tmuxlike'
  • use Vundle:

    Plugin 'karmenzind/vim-tmuxlike'

Intro

Prefix key

Just like <prefix>(usually CTRL-B) in tmux, there's a prefix key in vim-tmuxlike.

I use <c-a>(CTRL-A) as the default prefix key. You need to change it if you have the same keymap in tmux.

Features

original

You may be familiar with these basic operation.

Every keymap should start with <prefix>.

  • ? open vim-tmuxlike's helppage
  • z toggle buffer zoom mode

    ![](https://raw.githubusercontent.com/Karmenzind/i/master/vim-tmuxlike/toggle_zoom.gif)
  • % split window; open new buffer oh the right side

    ![](https://raw.githubusercontent.com/Karmenzind/i/master/vim-tmuxlike/vsplit_new.gif)
  • | split current buffer oh the right side

    ![](https://raw.githubusercontent.com/Karmenzind/i/master/vim-tmuxlike/vsplit_cur.gif)
  • " vertically split window; open new buffer downside

    ![](https://raw.githubusercontent.com/Karmenzind/i/master/vim-tmuxlike/split_new.gif)
  • _ split current buffer downside

    ![](https://raw.githubusercontent.com/Karmenzind/i/master/vim-tmuxlike/split_cur.gif)
  • c open a new tab with an empty window after the last tab
  • <c-h> <c-p> select previous tab

    `n` `<c-n>` `<c-l>`  select next tab
  • x close current buffer
  • & close current tab
  • ~ show history messages

    ![](https://raw.githubusercontent.com/Karmenzind/i/master/vim-tmuxlike/hist_msg.gif)
  • ! break current buffer (move current buffer to new tabpage)

    ![](https://raw.githubusercontent.com/Karmenzind/i/master/vim-tmuxlike/break_cur.gif)
  • d detach/suspend vim (the same as CTRL-Z)
  • r redraw current buffer
  • ] paste [from register *]
  • ; choose last buffer
  • h j k l Left Down Up Right change buffer
  • H J K L resize current window

These keymaps need t9md/vim-choosewin installed.

  • q s = enter choosewin mode

    ![choose_win](https://raw.githubusercontent.com/Karmenzind/i/master/vim-tmuxlike/choose_win.gif)
    

Config

Feel free to change the prefix key.
I recommend using a 'CTRL-' key combination which will be really convenient (e.g. with default prefix <c-a>, you just need to hold CTRL and type 'ah' for <prefix><c-h>).

" use CTRL-A (default)
nmap <c-a> <Plug>(tmuxlike-prefix)
" use CTRL-\ 
nmap <c-\> <Plug>(tmuxlike-prefix)
" use double leader (it will be `\\` if you haven't change the mapleader)
nmap <Leader><Leader> <Plug>(tmuxlike-prefix)

Problem or advice

Please create an issue and I'll fix it ASAP.

添加新评论