[英]How do I press “<C-L> <C-W>l<C-W>_” in Vim?
In one of the vim config files I have noticed this keyboard mapping map <CL> <CW>l<CW>_
supposedly for easier moving in tabs and windows. 在其中一个vim配置文件中,我注意到这个键盘映射map <CL> <CW>l<CW>_
据说更容易在选项卡和窗口中移动。 What does that translate to keyboard presses? 这对键盘印刷机有什么影响? What is that underscore at the end for? 最后的那个下划线是什么?
The command map <CL> <CW>l<CW>_
maps Ctrl-L to Ctrl-W , l
, Ctrl-W , _ . 命令map <CL> <CW>l<CW>_
将Ctrl-L映射到Ctrl-W , l
, Ctrl-W , _ 。
You invoke this binding by just pressing Ctrl-L . 只需按Ctrl-L即可调用此绑定。 To invoke what it binds to you would type Ctrl-W , then l
, followed by Ctrl-W again, and finally _ (which on a US keyboard is shift-hyphen). 要调用它绑定的内容,请键入Ctrl-W ,然后按l
,再按Ctrl-W ,最后按_ (在美国键盘上使用shift-hyphen)。 This is two separate bindings, <CW>l
moves the cursor to the window to the right, and <CW>_
resizes current window to the maximum possible vertical size. 这是两个单独的绑定, <CW>l
将光标移动到右侧的窗口, <CW>_
当前窗口调整为最大可能的垂直大小。
The Ctrl + w l Ctrl + w _ keys sequence is somewhat too long so someone has created a shortcut (" map
ping" in Vim-speak): Ctrl + L for it. Ctrl + w l Ctrl + w _ keys序列有点太长,所以有人创建了一个快捷方式(Vim-speak中的“ map
ping”): Ctrl + L代表它。
<Cw>l<Cw>_
moves the the cursor to the window on the right ( <Cw>l
) and maximizes it vertically ( <Cw>_
). <Cw>l<Cw>_
将光标移动到右侧窗口( <Cw>l
)并垂直最大化( <Cw>_
)。
Mappings always follow the same structure: 映射始终遵循相同的结构:
map
(or imap
for insert mode mapping, nmap
for normal mode mapping, etc.) map
(或插入模式映射的imap
, 正常模式映射的nmap
等)
some whitespace 一些空白
the shortcut you want, here <CL>
你想要的捷径,这里是<CL>
some whitespace 一些空白
the sequence of commands triggered by the shortcut 快捷方式触发的命令序列
See :help windows
for more info on window management and :help mapping
for more info on mappings. 有关窗口管理的更多信息,请参阅:help windows
:help mapping
以获取有关映射的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.