I've tried MiniBufExplorer, but I usually end up with several windows showing it or close it altogether. What I'd like is something like LustyJuggler with incremental search, the way I switch between buffers in Emacs. Surely there is a script like this?
我尝试过MiniBufExplorer,但我通常会用几个窗口来显示或关闭它。我想要的是像lustyler那样的增量搜索,我在Emacs中切换缓冲区的方式。肯定有这样的剧本吗?
16 个解决方案
#1
23
I have been using Wincent Colaiuta's Command-T vim plugin for a couple months now. Wincent wrote the parts of it that need to be fast in C, and I must say that it is! And, I think its file pattern matching logic is even better than Textmate's Command-T. Check out the screencast.
我已经用Wincent Colaiuta的命令t vim插件几个月了。Wincent写了一些需要在C语言中快速的部分,我必须说它是!而且,我认为它的文件模式匹配逻辑甚至比Textmate的命令- t更好。查看视频。
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.
VIM的命令- t插件提供了一种非常快速、直观的机制,用于打开文件,只需键入最少的击键次数。它被命名为“命令- t”,因为它是受“去文件”窗口的启发,该窗口绑定到TextMate中的命令- t。
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 contains many useful tips. I have adapted the following to my .vimrc, which does buffer-name auto-completion, maps the most useful buffer-switching commands to my <Leader> and left-side home row keys, and shows the current buffer number in the status line:
更容易的缓冲区切换包含许多有用的技巧。我已经将以下内容调整到我的.vimrc中,它实现了缓冲区名称的自动完成,将最有用的缓冲区切换命令映射到我的
"" 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
I also use MiniBufExplorer, which provides a compact listing of each listed buffer in its own horizontal split up top.
我还使用MiniBufExplorer,它在它自己的水平分割顶部提供了每个列出的缓冲区的紧凑列表。
#2
72
I used to use a combination of tabs and multiple gvim instances, keeping groups of related files as tabs in each instance. So long as I didn't end up with too many tabs in one instance, the tab bar shows you the name of each file you're editing at a glance.
我使用了多个选项卡和多个gvim实例的组合,将相关的文件分组作为每个实例的选项卡。只要我没有在一个实例中有太多的选项卡,标签栏就会显示你所编辑的每个文件的名称。
Then I read a post by Jamis Buck on how he switched from TextMate back to vim, and learned some great tricks:
然后我读了Jamis Buck的一篇文章,讲述了他如何从TextMate转回vim,并学习了一些很棒的技巧:
- Ctrl-w s and Ctrl-w v to split the current window
- 按Ctrl-w和Ctrl-w v分隔当前窗口。
- Ctrl-6 to switch back and forth between two buffers in the same window.
- Ctrl-6在同一个窗口中的两个缓冲区之间来回切换。
- the awesome fuzzyfinder.vim which gives you autocompleting search of files in your current directory or of buffers you currently have open
- 很棒的fuzzyfinder。vim使您能够自动完成当前目录或当前打开的缓冲区中文件的搜索。
- Jamis' own fuzzy_file_finder and fuzzyfinder_textmate, which slightly modify how fuzzyfinder works to behave more like a similar feature in TextMate (as far as I can tell, the difference is that it matches anywhere in the filename instead of only from the start). Watch this video to see it in action.
- Jamis'自己的fuzzy_file_finder和fuzzyfinder_textmate,它稍微修改了fuzzyfinder的工作方式,使其在TextMate中更像一个类似的特性(据我所知,区别在于它与文件名中的任何位置匹配,而不是仅从开始的位置)。观看这个视频,看它在行动。
Now I just have one gvim instance, maximised, and split it into multiple windows so I can see several files at once. I bound Ctrl-F to fuzzyfinder_textmate, so now if I type (say) Ctrl-F mod/usob
it opens up app/models/user_observer.rb. I almost never bother with tabs any more.
现在我只有一个gvim实例,最大化,并将它分割成多个窗口,这样我可以同时看到几个文件。我将Ctrl-F绑定到fuzzyfinder_textmate,所以现在如果我键入(say) Ctrl-F mod/usob,它会打开app/models/user_observer.rb。我几乎不再为标签操心了。
Update 2010/08/07
更新2010/08/07
While fuzzyfinder_textmate remains awesome, as Casey points out in the comments, it's no longer maintained. Also, it (and/or fuzzyfinder.vim) gets a bit slow and unstable when working with large projects (lots of directories or files), so I've been looking for an alternative.
虽然fuzzyfinder_textmate仍然很棒,正如Casey在评论中指出的那样,它已经不再被维护了。同时,它(和/或fuzzyfinder.vim)在处理大型项目(大量目录或文件)时变得有点慢和不稳定,所以我一直在寻找另一种方法。
Fortunately, there seems to be a very nice alternative in the form of Wincent Colaiuta's Command-T plugin. This has very similar (if not slightly better) behaviour to fuzzyfinder_textmate, but is noticeably faster; it also has nice features like being able to open the found file in a split or vertical split. Thanks (and upvotes!) to David Rivers for pointing to it.
幸运的是,在Wincent Colaiuta的命令- t插件的形式中,似乎有一个很好的选择。这与fuzzyfinder_textmate的行为非常相似(如果不是稍微好一点),但是明显更快;它还有一些不错的功能,比如可以在拆分或垂直拆分中打开找到的文件。感谢大卫·里弗斯的指点。
#3
33
I use the basics - ':ls
' + ':bn
'/':bp
' + ':b <part-of-name>
'
我使用最基本的——“:ls”+“:bn”/”:bp ' + ':b < part-of-name > '
#4
31
I like "ctrl-w s" and "ctlr-w v" to split the window. Then I map the movement keys (h, j, k, l) with ctrl held down to move between the split windows:
我喜欢“ctrl-w s”和“ctlr-w v”来分割窗口。然后,我将移动键(h, j, k, l)按ctrl向下移动,在分割窗口之间移动:
" Map ctrl-movement keys to window switching
map <C-k> <C-w><Up>
map <C-j> <C-w><Down>
map <C-l> <C-w><Right>
map <C-h> <C-w><Left>
Having to move my hand over to the arrow keys is annoying.
不得不把我的手移到方向键是很烦人的。
Next, I set up ctlr-tab to switch between buffers in the current window (like a lot of other environments):
接下来,我设置了ctlr-tab在当前窗口的缓冲区之间切换(像许多其他环境一样):
" Switch to alternate file
map <C-Tab> :bnext<cr>
map <C-S-Tab> :bprevious<cr>
These have worked pretty well for me over the last several years although vim always has more secrets than you can know.
在过去的几年里,虽然vim的秘密比你知道的要多,但是这些方法对我来说已经很好了。
#5
17
nmap <Leader>bb :ls<CR>:buffer<Space>
and nobody mentioned nice plugin ctrlp.vim. Using this plugin you can search buffer by name.
没有人提到过漂亮的插件。使用这个插件你可以搜索缓冲区的名字。
#6
14
I use
我使用
CTRL-J for next buffer
CTRL-J下缓冲
CTRL-K for previous buffer
CTRL-K之前缓冲
CTRL-L for next tab
ctrl - l下标签
CTRL-H for previous tab
CTRL-H为以前的标签
Here is the .vimrc
configuration:
这里是.vimrc配置:
map <C-J> :bnext<CR>
map <C-K> :bprev<CR>
map <C-L> :tabn<CR>
map <C-H> :tabp<CR>
See http://syskall.com/my-biggest-vim-productivity-boost/
参见http://syskall.com/my-biggest-vim-productivity-boost/
#7
6
I've recently gone more minimalistic.
我最近变得更简约了。
To cycle buffers I use ]b and [b from unimpaired: https://github.com/tpope/vim-unimpaired
对于循环缓冲区,我使用]b和[b来自未受损的:https://github.com/tpope/vim- un。
To jump straight to an open buffer just use Vim's tab completion with :b. A few letters is enough to get to any open buffer with a tab or two.
要直接跳转到一个开放的缓冲区,只需使用Vim的选项卡完成:b。几个字母就足够用一两个选项卡进入任何一个打开的缓冲区。
Similarly to open buffers I use :e with relative paths and tab complete.
类似地,我使用的打开缓冲区:e具有相对路径和选项卡完成。
I also use :ls occasionally to see what buffers I have open (and to check their modified status).
我还使用:ls偶尔查看我打开的缓冲区(以及检查它们的修改状态)。
To get rid of a buffer I use :bw to wipe the buffer. I usually make a temporary split and change buffers to preserve my layout though since :bw also closes the active window.
为了清除缓冲区,我使用:bw来擦除缓冲区。我通常会做一个临时的分割和更改缓冲区来保存我的布局,不过因为bw也关闭了活动窗口。
All the minibuf things I tried just ended up annoying me, and I don't want some smart-matching thing opening random files for me. If I really need to browse for something I use NERDtree (:e .).
我试过的所有小玩意都让我很烦,我不想让一些智能匹配的东西为我打开随机文件。如果我真的需要浏览一些东西,我使用NERDtree (:e .)。
IDK, Lately I also dropped Yankring (because it screws up xp) and started using registers, and I recently decided the f/t movements are the greatest thing ever...
IDK,最近我也放弃了Yankring(因为它把xp搞砸了),并且开始使用寄存器,最近我决定f/t的运动是最伟大的事情……
#8
5
imap <A-1> <Esc>:tabn 1<CR>i
imap <A-2> <Esc>:tabn 2<CR>i
imap <A-3> <Esc>:tabn 3<CR>i
imap <A-4> <Esc>:tabn 4<CR>i
imap <A-5> <Esc>:tabn 5<CR>i
imap <A-6> <Esc>:tabn 6<CR>i
imap <A-7> <Esc>:tabn 7<CR>i
imap <A-8> <Esc>:tabn 8<CR>i
imap <A-9> <Esc>:tabn 9<CR>i
map <A-1> :tabn 1<CR>
map <A-2> :tabn 2<CR>
map <A-3> :tabn 3<CR>
map <A-4> :tabn 4<CR>
map <A-5> :tabn 5<CR>
map <A-6> :tabn 6<CR>
map <A-7> :tabn 7<CR>
map <A-8> :tabn 8<CR>
map <A-9> :tabn 9<CR>
#9
2
The excellent Buffer Explorer, the be has gotten to be such strong muscle memory that I find myself wishing I could use it in other applications. I find it to be extremely fast when actively editing more than two files.
优秀的缓冲资源管理器,它已经成为强大的肌肉记忆,我发现自己希望我可以在其他应用程序中使用它。我发现它在积极编辑超过两个文件时速度非常快。
#10
2
I've spent quite a while building my .vimrc to work with this HTML::Mason project I've been on for four years, so I have an odd mix of tabs and split windows. For your viewing enjoyment:
我花了相当多的时间来构建我的.vimrc来处理这个HTML::Mason项目,我已经工作了四年,所以我有一个奇怪的标签和拆分窗口。你观赏的乐趣:
map ;o :Sex <CR>
map <C-J> <C-W>j
map <C-K> <C-W>k
map <C-l> <C-W>l
map <C-h> <C-W>h
map ;] :tabnext<CR>
map ;[ :tabprev<CR>
map <C-t> :tabe +"browse ."<CR>
map <C-O> :NERDTreeToggle ~/curr/trunk/<CR>
#11
2
I use tselectbuffer. It's really fast and unlike bufexplorer doesn't take space in your window. It also has a incremental search.I tried minibufexplorer and I found the navigation in the buffer a bit difficult.
我使用tselectbuffer。它非常快,不像bufexplorer不占用你的窗口空间。它也有一个增量搜索。我尝试了minibufexplorer,我发现缓冲区中的导航有点困难。
#12
2
To list and switch between buffers I use:
在我使用的缓冲区之间列出和切换:
nnoremap <Leader>l :ls<CR>:b<space>
To switch between buffers:
缓冲区之间的切换:
map <Leader>n :bn<CR>
map <Leader>p :bp<CR>
#13
2
I have mapped <S-J>
and <S-K>
to :bp
and :bn
, although I admit I don't use it as the number of files is greater than 10. I have then mapped <C-J>
and <C-K>
to Gnome Terminal's previous and next tabs, and I usually run 4 instances of vim for each of the 4 different projects I work on. I still really wish next and previous buffer would go to the history of buffers I have been working on, and not the order int he buffer list.
我已经将
#14
2
I use tselectbuffer. It's really fast and unlike bufexplorer doesn't take space in your window. It also has a incremental search.I tried minibufexplorer and I found the navigation in the buffer a bit difficult.
我使用tselectbuffer。它非常快,不像bufexplorer不占用你的窗口空间。它也有一个增量搜索。我尝试了minibufexplorer,我发现缓冲区中的导航有点困难。
#15
0
i use simple :vsplit with ^W+w/^W+r and :tabnew with Ctrl+Alt+PgUp/PgDown key combinations.
我使用简单:vsplit于W + W / W ^ ^ + r和:tabnew Ctrl + Alt + PgUp / PgDown组合键。
#16
0
When there are several buffers open in a Vim session, it can become difficult to keep track of the buffers and their respective buffer numbers. If this is the case, switching to a different file can be made easier using a simple map:
当在Vim会话中打开多个缓冲区时,跟踪缓冲区和它们各自的缓冲区数据可能变得困难。如果是这样,使用简单的映射可以更容易地切换到不同的文件:
:nnoremap (F5) :buffers(CR):buffer(Space)
:nnoremap(F5):缓冲区(CR):缓冲区(空间)
vim.wikia.com
#1
23
I have been using Wincent Colaiuta's Command-T vim plugin for a couple months now. Wincent wrote the parts of it that need to be fast in C, and I must say that it is! And, I think its file pattern matching logic is even better than Textmate's Command-T. Check out the screencast.
我已经用Wincent Colaiuta的命令t vim插件几个月了。Wincent写了一些需要在C语言中快速的部分,我必须说它是!而且,我认为它的文件模式匹配逻辑甚至比Textmate的命令- t更好。查看视频。
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.
VIM的命令- t插件提供了一种非常快速、直观的机制,用于打开文件,只需键入最少的击键次数。它被命名为“命令- t”,因为它是受“去文件”窗口的启发,该窗口绑定到TextMate中的命令- t。
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 contains many useful tips. I have adapted the following to my .vimrc, which does buffer-name auto-completion, maps the most useful buffer-switching commands to my <Leader> and left-side home row keys, and shows the current buffer number in the status line:
更容易的缓冲区切换包含许多有用的技巧。我已经将以下内容调整到我的.vimrc中,它实现了缓冲区名称的自动完成,将最有用的缓冲区切换命令映射到我的
"" 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
I also use MiniBufExplorer, which provides a compact listing of each listed buffer in its own horizontal split up top.
我还使用MiniBufExplorer,它在它自己的水平分割顶部提供了每个列出的缓冲区的紧凑列表。
#2
72
I used to use a combination of tabs and multiple gvim instances, keeping groups of related files as tabs in each instance. So long as I didn't end up with too many tabs in one instance, the tab bar shows you the name of each file you're editing at a glance.
我使用了多个选项卡和多个gvim实例的组合,将相关的文件分组作为每个实例的选项卡。只要我没有在一个实例中有太多的选项卡,标签栏就会显示你所编辑的每个文件的名称。
Then I read a post by Jamis Buck on how he switched from TextMate back to vim, and learned some great tricks:
然后我读了Jamis Buck的一篇文章,讲述了他如何从TextMate转回vim,并学习了一些很棒的技巧:
- Ctrl-w s and Ctrl-w v to split the current window
- 按Ctrl-w和Ctrl-w v分隔当前窗口。
- Ctrl-6 to switch back and forth between two buffers in the same window.
- Ctrl-6在同一个窗口中的两个缓冲区之间来回切换。
- the awesome fuzzyfinder.vim which gives you autocompleting search of files in your current directory or of buffers you currently have open
- 很棒的fuzzyfinder。vim使您能够自动完成当前目录或当前打开的缓冲区中文件的搜索。
- Jamis' own fuzzy_file_finder and fuzzyfinder_textmate, which slightly modify how fuzzyfinder works to behave more like a similar feature in TextMate (as far as I can tell, the difference is that it matches anywhere in the filename instead of only from the start). Watch this video to see it in action.
- Jamis'自己的fuzzy_file_finder和fuzzyfinder_textmate,它稍微修改了fuzzyfinder的工作方式,使其在TextMate中更像一个类似的特性(据我所知,区别在于它与文件名中的任何位置匹配,而不是仅从开始的位置)。观看这个视频,看它在行动。
Now I just have one gvim instance, maximised, and split it into multiple windows so I can see several files at once. I bound Ctrl-F to fuzzyfinder_textmate, so now if I type (say) Ctrl-F mod/usob
it opens up app/models/user_observer.rb. I almost never bother with tabs any more.
现在我只有一个gvim实例,最大化,并将它分割成多个窗口,这样我可以同时看到几个文件。我将Ctrl-F绑定到fuzzyfinder_textmate,所以现在如果我键入(say) Ctrl-F mod/usob,它会打开app/models/user_observer.rb。我几乎不再为标签操心了。
Update 2010/08/07
更新2010/08/07
While fuzzyfinder_textmate remains awesome, as Casey points out in the comments, it's no longer maintained. Also, it (and/or fuzzyfinder.vim) gets a bit slow and unstable when working with large projects (lots of directories or files), so I've been looking for an alternative.
虽然fuzzyfinder_textmate仍然很棒,正如Casey在评论中指出的那样,它已经不再被维护了。同时,它(和/或fuzzyfinder.vim)在处理大型项目(大量目录或文件)时变得有点慢和不稳定,所以我一直在寻找另一种方法。
Fortunately, there seems to be a very nice alternative in the form of Wincent Colaiuta's Command-T plugin. This has very similar (if not slightly better) behaviour to fuzzyfinder_textmate, but is noticeably faster; it also has nice features like being able to open the found file in a split or vertical split. Thanks (and upvotes!) to David Rivers for pointing to it.
幸运的是,在Wincent Colaiuta的命令- t插件的形式中,似乎有一个很好的选择。这与fuzzyfinder_textmate的行为非常相似(如果不是稍微好一点),但是明显更快;它还有一些不错的功能,比如可以在拆分或垂直拆分中打开找到的文件。感谢大卫·里弗斯的指点。
#3
33
I use the basics - ':ls
' + ':bn
'/':bp
' + ':b <part-of-name>
'
我使用最基本的——“:ls”+“:bn”/”:bp ' + ':b < part-of-name > '
#4
31
I like "ctrl-w s" and "ctlr-w v" to split the window. Then I map the movement keys (h, j, k, l) with ctrl held down to move between the split windows:
我喜欢“ctrl-w s”和“ctlr-w v”来分割窗口。然后,我将移动键(h, j, k, l)按ctrl向下移动,在分割窗口之间移动:
" Map ctrl-movement keys to window switching
map <C-k> <C-w><Up>
map <C-j> <C-w><Down>
map <C-l> <C-w><Right>
map <C-h> <C-w><Left>
Having to move my hand over to the arrow keys is annoying.
不得不把我的手移到方向键是很烦人的。
Next, I set up ctlr-tab to switch between buffers in the current window (like a lot of other environments):
接下来,我设置了ctlr-tab在当前窗口的缓冲区之间切换(像许多其他环境一样):
" Switch to alternate file
map <C-Tab> :bnext<cr>
map <C-S-Tab> :bprevious<cr>
These have worked pretty well for me over the last several years although vim always has more secrets than you can know.
在过去的几年里,虽然vim的秘密比你知道的要多,但是这些方法对我来说已经很好了。
#5
17
nmap <Leader>bb :ls<CR>:buffer<Space>
and nobody mentioned nice plugin ctrlp.vim. Using this plugin you can search buffer by name.
没有人提到过漂亮的插件。使用这个插件你可以搜索缓冲区的名字。
#6
14
I use
我使用
CTRL-J for next buffer
CTRL-J下缓冲
CTRL-K for previous buffer
CTRL-K之前缓冲
CTRL-L for next tab
ctrl - l下标签
CTRL-H for previous tab
CTRL-H为以前的标签
Here is the .vimrc
configuration:
这里是.vimrc配置:
map <C-J> :bnext<CR>
map <C-K> :bprev<CR>
map <C-L> :tabn<CR>
map <C-H> :tabp<CR>
See http://syskall.com/my-biggest-vim-productivity-boost/
参见http://syskall.com/my-biggest-vim-productivity-boost/
#7
6
I've recently gone more minimalistic.
我最近变得更简约了。
To cycle buffers I use ]b and [b from unimpaired: https://github.com/tpope/vim-unimpaired
对于循环缓冲区,我使用]b和[b来自未受损的:https://github.com/tpope/vim- un。
To jump straight to an open buffer just use Vim's tab completion with :b. A few letters is enough to get to any open buffer with a tab or two.
要直接跳转到一个开放的缓冲区,只需使用Vim的选项卡完成:b。几个字母就足够用一两个选项卡进入任何一个打开的缓冲区。
Similarly to open buffers I use :e with relative paths and tab complete.
类似地,我使用的打开缓冲区:e具有相对路径和选项卡完成。
I also use :ls occasionally to see what buffers I have open (and to check their modified status).
我还使用:ls偶尔查看我打开的缓冲区(以及检查它们的修改状态)。
To get rid of a buffer I use :bw to wipe the buffer. I usually make a temporary split and change buffers to preserve my layout though since :bw also closes the active window.
为了清除缓冲区,我使用:bw来擦除缓冲区。我通常会做一个临时的分割和更改缓冲区来保存我的布局,不过因为bw也关闭了活动窗口。
All the minibuf things I tried just ended up annoying me, and I don't want some smart-matching thing opening random files for me. If I really need to browse for something I use NERDtree (:e .).
我试过的所有小玩意都让我很烦,我不想让一些智能匹配的东西为我打开随机文件。如果我真的需要浏览一些东西,我使用NERDtree (:e .)。
IDK, Lately I also dropped Yankring (because it screws up xp) and started using registers, and I recently decided the f/t movements are the greatest thing ever...
IDK,最近我也放弃了Yankring(因为它把xp搞砸了),并且开始使用寄存器,最近我决定f/t的运动是最伟大的事情……
#8
5
imap <A-1> <Esc>:tabn 1<CR>i
imap <A-2> <Esc>:tabn 2<CR>i
imap <A-3> <Esc>:tabn 3<CR>i
imap <A-4> <Esc>:tabn 4<CR>i
imap <A-5> <Esc>:tabn 5<CR>i
imap <A-6> <Esc>:tabn 6<CR>i
imap <A-7> <Esc>:tabn 7<CR>i
imap <A-8> <Esc>:tabn 8<CR>i
imap <A-9> <Esc>:tabn 9<CR>i
map <A-1> :tabn 1<CR>
map <A-2> :tabn 2<CR>
map <A-3> :tabn 3<CR>
map <A-4> :tabn 4<CR>
map <A-5> :tabn 5<CR>
map <A-6> :tabn 6<CR>
map <A-7> :tabn 7<CR>
map <A-8> :tabn 8<CR>
map <A-9> :tabn 9<CR>
#9
2
The excellent Buffer Explorer, the be has gotten to be such strong muscle memory that I find myself wishing I could use it in other applications. I find it to be extremely fast when actively editing more than two files.
优秀的缓冲资源管理器,它已经成为强大的肌肉记忆,我发现自己希望我可以在其他应用程序中使用它。我发现它在积极编辑超过两个文件时速度非常快。
#10
2
I've spent quite a while building my .vimrc to work with this HTML::Mason project I've been on for four years, so I have an odd mix of tabs and split windows. For your viewing enjoyment:
我花了相当多的时间来构建我的.vimrc来处理这个HTML::Mason项目,我已经工作了四年,所以我有一个奇怪的标签和拆分窗口。你观赏的乐趣:
map ;o :Sex <CR>
map <C-J> <C-W>j
map <C-K> <C-W>k
map <C-l> <C-W>l
map <C-h> <C-W>h
map ;] :tabnext<CR>
map ;[ :tabprev<CR>
map <C-t> :tabe +"browse ."<CR>
map <C-O> :NERDTreeToggle ~/curr/trunk/<CR>
#11
2
I use tselectbuffer. It's really fast and unlike bufexplorer doesn't take space in your window. It also has a incremental search.I tried minibufexplorer and I found the navigation in the buffer a bit difficult.
我使用tselectbuffer。它非常快,不像bufexplorer不占用你的窗口空间。它也有一个增量搜索。我尝试了minibufexplorer,我发现缓冲区中的导航有点困难。
#12
2
To list and switch between buffers I use:
在我使用的缓冲区之间列出和切换:
nnoremap <Leader>l :ls<CR>:b<space>
To switch between buffers:
缓冲区之间的切换:
map <Leader>n :bn<CR>
map <Leader>p :bp<CR>
#13
2
I have mapped <S-J>
and <S-K>
to :bp
and :bn
, although I admit I don't use it as the number of files is greater than 10. I have then mapped <C-J>
and <C-K>
to Gnome Terminal's previous and next tabs, and I usually run 4 instances of vim for each of the 4 different projects I work on. I still really wish next and previous buffer would go to the history of buffers I have been working on, and not the order int he buffer list.
我已经将
#14
2
I use tselectbuffer. It's really fast and unlike bufexplorer doesn't take space in your window. It also has a incremental search.I tried minibufexplorer and I found the navigation in the buffer a bit difficult.
我使用tselectbuffer。它非常快,不像bufexplorer不占用你的窗口空间。它也有一个增量搜索。我尝试了minibufexplorer,我发现缓冲区中的导航有点困难。
#15
0
i use simple :vsplit with ^W+w/^W+r and :tabnew with Ctrl+Alt+PgUp/PgDown key combinations.
我使用简单:vsplit于W + W / W ^ ^ + r和:tabnew Ctrl + Alt + PgUp / PgDown组合键。
#16
0
When there are several buffers open in a Vim session, it can become difficult to keep track of the buffers and their respective buffer numbers. If this is the case, switching to a different file can be made easier using a simple map:
当在Vim会话中打开多个缓冲区时,跟踪缓冲区和它们各自的缓冲区数据可能变得困难。如果是这样,使用简单的映射可以更容易地切换到不同的文件:
:nnoremap (F5) :buffers(CR):buffer(Space)
:nnoremap(F5):缓冲区(CR):缓冲区(空间)
vim.wikia.com