使用在 Vim 窗口之间移动和
我的 .vimrc
中有以下几行:
nnoremap <tab> :wincmd w<cr>
nnoremap <s-tab> :wincmd W<cr>
我想在正常模式下快速在 Vim 窗口之间移动。上面的映射在窗口之间工作正常,但是当我到达 MiniBufExplorer 时,它被卡住并且不会旋转到第一个窗口。
我应该如何映射它,以便它不会移动到 MiniBufExplorer 中?
I have the following lines in my .vimrc
:
nnoremap <tab> :wincmd w<cr>
nnoremap <s-tab> :wincmd W<cr>
I want to move between Vim windows quickly using in Normal Mode. The above mappings work all right between windows, but when I get to the MiniBufExplorer, it gets stuck and doesn't rotate to the first window.
How should I map this so that it doesn't move into MiniBufExplorer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
minibufexpl.vim 插件中有两行重新映射 Tab 以循环显示 MiniBufExplorer 窗口中的缓冲区名称。如果您删除/注释这些内容,您的选项卡重新映射将起作用。
此外,下面的全局设置已经控制了在窗口或缓冲区之间切换的 C-Tab 功能。您可能想要修改这些或至少了解此功能。注意,您仍然需要删除上面的 Tab 映射才能获得基于 Tab(而不是 C-Tab)的移动。
There are two lines in the minibufexpl.vim plugin that remap Tab to cycle through the buffer names shown in the MiniBufExplorer window. If you remove/comment these, your tab remapping will work.
Additionally, there are global settings below which already control the C-Tab functionality for switching between either windows or buffers. You may want to modify these or at least be aware of this feature. NB, you will still have to remove the above Tab mapping to get Tab (instead of C-Tab) based movement.
不完全符合您的要求,但这些是在窗口之间移动的有用键盘快捷键。
这使得
Ctrl +
在窗口之间移动(包括打开时的 MiniBufExpl)。 Tab 可能更适合代码完成,请查看 SuperTab 插件。Not exactly what you asked for but these are useful keyboard shortcuts to move between windows.
This makes
Ctrl + <direction>
move between windows (including MiniBufExpl when it's open). Tab is probably better reserved for code completion, check out the SuperTab plugin.