加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

你如何喜欢在Vim中的缓冲区之间切换?

发布时间:2020-12-15 16:51:30 所属栏目:安全 来源:网络整理
导读:我试过 MiniBufExplorer,但我通常最后有几个窗口显示它或完全关闭。我想要的是像增量搜索的 LustyJuggler,我在Emacs中的缓冲区之间切换的方式。当然有这样的脚本? 我已经使用Wincent Colaiuta的 Command-T vim plugin几个月了。 Wincent写了它的需要在C中
我试过 MiniBufExplorer,但我通常最后有几个窗口显示它或完全关闭。我想要的是像增量搜索的 LustyJuggler,我在Emacs中的缓冲区之间切换的方式。当然有这样的脚本?
我已经使用Wincent Colaiuta的 Command-T vim plugin几个月了。 Wincent写了它的需要在C中快速的部分,我必须说,它是!而且,我认为它的文件模式匹配逻辑甚至比Textmate的Command-T更好。查看 screencast。

The Command-T plug-in for VIM provides
an extremely fast,intuitive mechanism
for opening files with a minimal
number of keystrokes. It’s named
“Command-T” because it is inspired by
the “Go to File” window bound to
Command-T in TextMate.

Files are selected by typing
characters that appear in their paths,
and are ordered by an algorithm which
knows that characters that appear in
certain locations (for example,
immediately after a path separator)
should be given more weight.

Easier buffer switching包含许多有用的提示。我已经适应以下到我的.vimrc,它做缓冲区名称自动完成,将最有用的缓冲区切换命令映射到我的< Leader>和左侧主行键,并在状态行中显示当前缓冲区号:

"" Tab triggers buffer-name auto-completion
set wildchar=<Tab> wildmenu wildmode=full

let mapleader = ","

map <Leader>t :CommandT<Return>
map <Leader>a :bprev<Return>
map <Leader>s :bnext<Return>
map <Leader>d :bd<Return>
map <Leader>f :b 

"" Show the buffer number in the status line.
set laststatus=2 statusline=%02n:%<%f %h%m%r%=%-14.(%l,%c%V%) %P

我还使用MiniBufExplorer,它提供了每个列出的缓冲区在其自己的水平分割顶部的紧凑列表。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读