无法限制 Ctrl-O 在 Vim 中仅打开当前缓冲区
时,我会打开旧缓冲区
Ctrl-O
当我按下“我只想浏览在当前 Vim 会话中打开的缓冲区”
。 如何使用 Ctrl-O 在 Vim 中的当前缓冲区之间快速浏览?
I get the old buffers to be opened when I press
Ctrl-O
I want only to browse buffers which I have opened in the current Vim session.
How can you browse fast between current buffers in Vim with Ctrl-O?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,我不知道如何使
CTRL-O
表现出您想要的方式。 但我可以为您提供一些可能对您有帮助的提示。您可以使用
g;
和g,
跳转到您进行更改的位置,但仅限于当前缓冲区。我知道这与
CTRL-O/I
不同,因为这只是关于“更改”,并且它只跟踪当前缓冲区,但它无论如何可能会有用。您可以使用
.vimrc
中的映射快速导航打开的缓冲区,如下所示:我知道这并不能真正回答您的问题,但我认为也许这对夫妇一些技巧可能会对您的振动有所帮助。
编辑:我想补充一点,由于您对快速浏览缓冲区感兴趣,我个人推荐一个名为 QuickBuf 的小插件:
http://www.vim.org/scripts/script.php?script_id=1910
我将其映射到我的
.vimrc< /code> 如下:
尝试一下,它比输入
:ls
快得多,另一个巧妙的事情是您可以使用j/k
在列表上移动,然后按>
选择缓冲区。unfortunately I don't know how to make
CTRL-O
to behave the way you'd like. But I can offer you a couple of tips that might be helpful to you.You can use
g;
andg,
to jump to the places where you have made a change, but only in the current buffer.I know this is not the same as
CTRL-O/I
, since this is only about "changes", and it only tracks the current buffer, but it might be useful anyway.You can quickly navigate your opened buffers with a mapping in your
.vimrc
like this:I know this doesn't really answer your question, but I thought that maybe these couple of tips might help a little with your vimming.
Edit: I wanted to add, that since you are interested in fast browsing of buffers, I personally recommend a little plugin called QuickBuf:
http://www.vim.org/scripts/script.php?script_id=1910
I map it in my
.vimrc
as this:Try it, it way faster than typing
:ls
and another neat thing is that you can move on the list withj/k
and press<enter>
to select the buffer.