了解 Vim 中的窗口
我了解缓冲区,但不确定如何在窗口中导航?我使用 Ack 插件和 NERDTree。如果我在 NERDTree 窗口和主编码窗口都打开的情况下在 Ack 中搜索某些内容,我如何在这三个不同的窗口之间切换?
有时,我不小心打开了一个接管 NERDTree 窗口的文件,所以现在我有两个包含代码的窗口和一个 Ack 窗口。然后我必须关闭我打开的缓冲区,这最终会关闭窗口,然后重新打开 NERDTree。
I have an understanding of buffers, but I am unsure as to how to navigate through windows? I use the Ack plugin and NERDTree. If I search for something in Ack while having both the NERDTree window and my main coding window open, how can I switch between these three different windows?
Occasionally, I accidentally open a file that takes over the NERDTree window, so now I have two windows with code, and one Ack window. Then I have to end up closing the buffer I opened, which ends up closing the window, then reopening NERDTree.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过执行以下操作在窗口之间移动:
Ctrl-w
后跟方向键,例如h
、j
、k
或l
(或使用相应的箭头键
)。You can move between windows by doing the following:
Ctrl-w
followed by a directional key, for exampleh
,j
,k
, orl
(or by using the correspondingarrow keys
).如果您设法在当前窗口中打开另一个缓冲区,您可以使用
Ci
和Co
在跳转列表中前后移动,这将带您回到 nerdTree 缓冲区 I相信(我自己不使用nerdTree,所以可以确认)If you manage to open another buffer in the current window you can use
C-i
andC-o
to move backwards and forwards in your jump list which should bring you back to your nerdTree buffer I believe (dont use nerdTree myself so can confirmit)