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
Installation
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
Tmux users may be familiar with these basic operation.
Every keymap should start with <prefix>
.
?
open vim-tmuxlike's helppagez
toggle buffer zoom mode%
split window; open new buffer oh the right side|
split current buffer oh the right side (custom:g:tmuxlike_key_vsplit
)"
vertically split window; open new buffer downside_
split current buffer downside (custom:g:tmuxlike_key_hsplit
)c
open a new tab with an empty window after the last tab<c-h>
<c-p>
select previous tabn
<c-n>
<c-l>
select next tabx
close current buffer&
close current tab~
show history messages!
break current buffer (move current buffer to new tabpage)d
detach/suspend vim (the same as CTRL-Z)r
redraw current buffer]
paste [from register *];
choose last bufferh
j
k
l
Left
Down
Up
Right
change bufferH
J
K
L
resize current window
These keymaps need t9md/vim-choosewin installed.
Config
Prefix key
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)
Operation key maps
" use <prefix> + <key> to split current buffer
let g:tmuxlike_key_vsplit = '\' " default value: \| (slash is for escaping)
let g:tmuxlike_key_hsplit = '-' " default value: _
Problem or advice
Please create an issue and I'll fix it ASAP.