Vim Tips Wiki
Register
No edit summary
 
m (Buffers in GVIM moved to Use the buffer menu in gvim: Page moved by JohnBot to improve title)

Revision as of 10:15, 18 October 2007

Previous TipNext Tip

Tip: #1051 - Use the buffer menu in gvim

Created: November 18, 2005 6:54 Complexity: basic Author: Ronald Speelman Version: 5.7 Karma: 127/37 Imported from: Tip#1051

When working with GVIM, I like to "tear off" the buffermenu to keep track of my open buffers.

You can do this very quick by hitting: Alt-b [enter]

The floating buffermenu will be positioned at your mouse cursor.


You can also automate this by putting this in your .vimrc file:

au VimEnter * :te Buffers


To open a file in a new buffer instead of opening a new window everytime:

- When opening files in Windows Explorer: read VimTip1003: Open files with existing Gvim window in Windows

- When opening files in Cygwin: add this to your .bashrc : alias vi='gvim --remote-silent'

- When opening files in a DOS window add this to your doskey configuration: vi=gvim --remote-silent $*


When working in VIM, I recomend you use the minibuffer explorer: minibufexpl.vim : Elegant buffer explorer - takes very little screen space

Comments

Great tip! Thanks!!

Anonymous , November 18, 2005 7:14


Except the hidden buffers don't show up.

try editing a directory, quickly it will get lost and not be visible in the buffer list:

example

e .
e /etc
e /usr


Jake , November 20, 2005 12:21


When opening a help file there happens a funny thing here (Windows): The menu becomes wider even though the help buffer isn't listed there.

vim at bertram dash scharpf dot de , November 21, 2005 1:43


Works great, simple solution, easy to work with.

Yes, there are no hidden buffers listed, but this solution is making use of standard functionality, is this normal for the buffers menu? Does anybody knows how to add hidden buffers to the bufferlist?


johan , November 21, 2005 8:48


hmm, no problem with the width of the bufferlist when opening a help window... I'm using version 6.4.

James K , November 21, 2005 22:45


Just a small addendum: I'm using Vim 6.3 in Fedora 4, and to tear off the menu I have to press Alt-b [up] [enter], otherwise you select 'Refresh Menu.' You just want to select the dashed line from the buffers menu, which is right at the top (you can do this with your mouse if you prefer).

ngmather--AT--gmail.com , January 1, 2006 11:04


cool, I have been looking for an easy way to do this for a long time, thanks.

Anonymous , January 11, 2006 4:05