Vim Tips Wiki
Register
m (Buffers in GVIM moved to Use the buffer menu in gvim: Page moved by JohnBot to improve title)
(Change <tt> to <code>, perhaps also minor tweak.)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{review}}
 
{{review}}
  +
{{TipImported
{{Tip
 
 
|id=1051
 
|id=1051
  +
|previous=1050
|title=Buffers in GVIM
 
  +
|next=1052
|created=November 18, 2005 6:54
+
|created=2005
 
|complexity=basic
 
|complexity=basic
 
|author=Ronald Speelman
 
|author=Ronald Speelman
 
|version=5.7
 
|version=5.7
 
|rating=127/37
 
|rating=127/37
  +
|category1=
|text=
 
  +
|category2=
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
 
 
 
 
 
 
}}
 
}}
 
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
== Comments ==
 
Great tip! Thanks!!
 
   
 
The floating buffermenu will be positioned at your mouse cursor.
'''Anonymous'''
 
, November 18, 2005 7:14
 
----
 
Except the hidden buffers don't show up.
 
   
 
You can also automate this with the following in your vimrc file:
try editing a directory, quickly it will get lost
 
  +
<pre>
and not be visible in the buffer list:
 
 
au VimEnter * :te Buffers
  +
</pre>
   
 
To open a file in a new buffer instead of opening a new window every time:
example
 
 
*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: <code>alias vi='gvim --remote-silent'</code>
 
*When opening files in a command-prompt window, add this to your doskey configuration: <code>vi=gvim --remote-silent $*</code>
   
 
When working in Vim, I recomend you use the minibuffer explorer: minibufexpl.vim : Elegant buffer explorer - takes very little screen space
:e .
 
:e /etc
 
:e /usr
 
   
 
==Comments==
  +
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:
   
  +
<pre>
Jake
 
 
:e .
, November 20, 2005 12:21
 
 
:e /etc
----
 
 
:e /usr
When opening a help file there happens
 
  +
</pre>
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
 
 
----
 
----
<!-- parsed by vimtips.py in 0.579300 seconds-->
 

Latest revision as of 06:05, 13 July 2012

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

Comments[]

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