Wikia

Vim Tips Wiki

Use the buffer menu in gvim

Talk0
1,612pages on
this wiki
Revision as of 06:05, July 13, 2012 by JohnBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Tip 1051 Printable Monobook Previous Next

created 2005 · complexity basic · author Ronald Speelman · version 5.7


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

You can do this very quickly by hitting: Alt-b Enter

The floating buffermenu will be positioned at your mouse cursor.

You can also automate this with the following in your vimrc file:

au VimEnter * :te Buffers

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

  • 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 command-prompt 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

CommentsEdit

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

Around Wikia's network

Random Wiki