set winminheight=0 map <C-J> <C-W>j<C-W>_ map <C-K> <C-W>k<C-W>_
点击Control-j或Control-k通过向上或向下导航水平分割.通过使用Control-Shift-h和Control-Shift-l显示或隐藏左或右分割,我想要完成的是垂直分割; h向左移动,向右移动.我尝试过以下几点但没有成功:
set winminwidth=0 map <S-C-L> 500<C-W>h<C-W>_ map <S-C-H> 500<C-W>l<C-W>_
该动作类似于利用Control-w-<和Control-w-> ;,只将垂直分割完全向左移动或写入,而不是一次只移动一行. 有关如何实现这一目标的任何想法?谢谢.
set winminwidth=0 nmap <Leader><C-h> <C-W>h500<C-W>> nmap <Leader><C-l> <C-W>l500<C-W>>
vim中的常用leader键是逗号和反斜杠:
:let mapleader = ","
但是你会发现这对于要求3次击键很烦人,所以你不妨放下控制键击.这样(如果你的领导是逗号),你只需按“,h”和“,l”就可以左右分割:
set winminwidth=0 nmap <Leader>h <C-W>h500<C-W>> nmap <Leader>l <C-W>l500<C-W>> " (FTW) :D
…
一个名叫Tony Chapman answers的人为什么不能使用控制班次:
Vim maps its
Ctrl+printable_key
combinations according to ASCII. This
means that “Ctrl+lowercase letter
” is
the same as the corresponding
“Ctrl+uppercase letter
” and that
Ctrl+<key>
(where<key>
is a printable
key) is only defined when<key>
is in
the range 0x40-0x5F,a lowercase
letter,or a question mark. It also
means thatCtrl-[
is the same asEsc
,
Ctrl-M
is the same asEnter
,Ctrl-I
is
the same asTab
.So yes,
Ctrl-s
andCtrl-S
(i.e.Ctrl-s
andCtrl-Shift-s
) are the same to Vim. This is by design and is not going to change.