Loading ...
Sorry, an error occurred while loading the content.

93893Re: Opening every buffer in its own tab

Expand Messages
  • Tony Mechelynck
    Aug 1, 2008
    • 0 Attachment
      On 01/08/08 11:23, Scara Maccai wrote:
      >> That's absolutely not what "everyone" wants, and most experienced
      >> vimmers, in particular those who work with more than 30 or so buffers
      >> simultaneously, would absolutely hate that.
      > Maybe that's what I don't understand.
      > How, when you have 30 buffers open, you find the buffer you want? You
      > can't remember all the numbers, you can't remember exactly all the
      > names. That's what tabs are for in other editors: find the file you
      > want when you remember what the name "looks like".
      >> Most editors don't even
      >> have a way to have a buffer loaded that isn't being displayed in a
      >> tab, I find that ability essential to my vim workflow.
      > Again maybe that's something I don't understand: what is a buffer good
      > for if you don't see it?
      > Please don't take these question the wrong way: I love everything
      > about vim, I just can't understand the "meaning" of buffers...

      In Vim, a buffer is an area of memory where Vim stores one file. A
      buffer may be hidden (I rarely use that) or displayed in a window.

      A window is a viewport to an area of a buffer. It consists of one
      statusline (with the pathfilename of the file being edited, its line,
      column, percentage down the file, the latter being replaced by "All"
      "Top" or "Bot" when you are seeing one or both ends of the file) plus
      zero or more lines of buffer text.

      Any buffer can be displayed in any number of windows (zero or more).

      Starting at version 7, one or more windows are arranged side-by-side
      and/or above one another in a tab. Until Vim 6, there was no provision
      for separate tabs, this is more or less equivalent to using one tab (per
      instance) in version 7. At version 7 you can have one or more tabs in a
      single Vim instance, which is more or less like having a choice of
      preset sessions in a single instance of Vim (and therefore sharing the
      same screen height, width and font).

      Each tab is a distinct arrangement of one or more split windows. Unlike
      windows, only one tab is displayed at a time in any Vim instance.

      You can have zero, one, or more instances of Console Vim and/or gvim
      running at the same time on one computer. Each instance of Console Vim
      interfaces with both keyboard and display through the text terminal in
      which it is loaded, and (for instance) cannot change the font; but on
      Unix you don't need to start X to run it, and even on Windows you can
      run it "really full-screen", with no MS-Windows frame at all (usually
      80x25, 80x43 or 80x60 characters on the screen, and nothing else to
      disturb you). Each instance of gvim needs a graphical interface such as
      X-Windows or MS-Windows, but it can set (among others) the height, width
      and font of its display interface. However, even in gvim, all tabs and
      windows in a given program instance share the same font face and size.

      I rarely use tabs. What I use is what I call "Rolodex Vim", which is set
      as follows:

      :set noequalalways winheight=99999 winminheight=0

      Or sometimes I use "true split windows", either side-by-side (usually in
      gvimdiff) or top-to-bottom (with ":set equalalways winheight=1").

      With Rolodex Vim, all windows in the current tab are reduced to just one
      statusline each, except the current window which expands to full height.
      The advantage (from my POV) is that unlike with tabs (which must all fit
      on a single line) here each window has one full line to display its
      filename and position. Clicking on a statusbar selects that window, or I
      can also use Ctrl-W w (next window down, round-robin) or Ctrl-W W (the
      opposite; W is of course shift-w), or either with a count (select Nth
      window). I even have the following maps to switch windows with a single key:

      :map <F11> <C-W>w
      :imap <F11> <C-O><C-W>w
      :map <S-F11> <C-W>W
      :imap <S-F11> <C-O><C-W>W

      The Vim session I use most steadily (and save with ":mks!" when I want
      to close gvim, e.g. to install a new version/patchlevel; then restore
      later with "gvim -S") contains 15 windows (not 30) in a single tab.
      Sometimes I start a parallel session in another instance, maybe with a
      different font.

      Best regards,
      Jesus was killed by a Moral Majority.

      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 16 messages in this topic