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

Re: All tabs visible in GVim?

Expand Messages
  • Tony Mechelynck
    ... This open each buffer in a different tab. If you have set guitablabel (in the GUI if guioptions contains e ) or tabline (in the console vertion, or
    Message 1 of 6 , Oct 2, 2007
    • 0 Attachment
      Steve Hall wrote:
      > From: AidanH, Tue, October 02, 2007 3:22 pm
      >> I often have many files open at once, and am looking for a way to
      >> switch to another tab without scrolling through the list of open
      >> tabs.
      >
      > These move from tab to tab:
      >
      > :tabnext
      > :tabprev
      >
      >> Is there a way of keeping all tabs visible in the same window?
      >
      > This "shows" all tabs:
      >
      > :tab ball
      >

      This open each buffer in a different tab. If you have set 'guitablabel' (in
      the GUI if 'guioptions' contains "e") or 'tabline' (in the console vertion, or
      if 'guioptions' doesn't contain "e") is set to display long filepathnames, or
      if there are a lot of buffers, the tab line won't be able to hold them all and
      you'll get scrolling arrows (if using the GUI tab line) or an overflow marker
      (if using the text tab line). IIUC the only solution is to make the tab text
      shorter and/or the font smaller. The font for text tabs is your 'guifont' but
      for the GUI-style tabs it is some system font, which cannot be changed in a
      running Vim; I think that on some systems it can be set by the |-menufont|
      command-line argument.

      Another possibility is to open files in split-windows rather than tabs.
      "Rolodex Vim" (as shown below) will show as much text as possible for the
      current window, and only a status line for the non-current ones:

      :set noea wmh=0 wh=99999 ls=2


      Best regards,
      Tony.
      --
      Albert Einstein, when asked to describe radio, replied: "You see, wire
      telegraph is a kind of a very, very long cat. You pull his tail in New
      York and his head is meowing in Los Angeles. Do you understand this?
      And radio operates exactly the same way: you send signals here, they
      receive them there. The only difference is that there is no cat."

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • AidanH
      OK...after looking through the options, I ve shortened the tab so that only the filename and modified flag are displayed, and put the full path in the tooltip.
      Message 2 of 6 , Oct 3, 2007
      • 0 Attachment
        OK...after looking through the options, I've shortened the tab so that
        only the filename and modified flag are displayed, and put the full
        path in the tooltip.

        <pre>
        set guitabtooltip=%f
        function GuiTabLabel()
        let label = ''
        let bufnrlist = tabpagebuflist(v:lnum)

        " Add '+' if one of the buffers in the tab page is modified
        for bufnr in bufnrlist
        if getbufvar(bufnr, "&modified")
        let label = '+'
        break
        endif
        endfor

        " Add short file name
        let bufId = bufnrlist[tabpagewinnr(v:lnum) - 1]
        let fn = bufname(bufId)
        let lastSlash = strridx(fn, '\')
        return label . strpart(fn, lastSlash+1, strlen(fn))
        endfunction
        set guitablabel=%{GuiTabLabel()}
        </pre>

        This has freed up space and looks tidier too.

        Thanks,

        AidanH


        On Oct 2, 9:02 pm, Tony Mechelynck <antoine.mechely...@...>
        wrote:
        > Steve Hall wrote:
        > > From: AidanH, Tue, October 02, 2007 3:22 pm
        > >> I often have many files open at once, and am looking for a way to
        > >> switch to another tab without scrolling through the list of open
        > >> tabs.
        >
        > > These move from tab to tab:
        >
        > > :tabnext
        > > :tabprev
        >
        > >> Is there a way of keeping all tabs visible in the same window?
        >
        > > This "shows" all tabs:
        >
        > > :tab ball
        >
        > This open each buffer in a different tab. If you have set 'guitablabel' (in
        > the GUI if 'guioptions' contains "e") or 'tabline' (in the console vertion, or
        > if 'guioptions' doesn't contain "e") is set to display long filepathnames, or
        > if there are a lot of buffers, the tab line won't be able to hold them all and
        > you'll get scrolling arrows (if using the GUI tab line) or an overflow marker
        > (if using the text tab line). IIUC the only solution is to make the tab text
        > shorter and/or the font smaller. The font for text tabs is your 'guifont' but
        > for the GUI-style tabs it is some system font, which cannot be changed in a
        > running Vim; I think that on some systems it can be set by the |-menufont|
        > command-line argument.
        >
        > Another possibility is to open files in split-windows rather than tabs.
        > "Rolodex Vim" (as shown below) will show as much text as possible for the
        > current window, and only a status line for the non-current ones:
        >
        > :set noea wmh=0 wh=99999 ls=2
        >
        > Best regards,
        > Tony.
        > --
        > Albert Einstein, when asked to describe radio, replied: "You see, wire
        > telegraph is a kind of a very, very long cat. You pull his tail in New
        > York and his head is meowing in Los Angeles. Do you understand this?
        > And radio operates exactly the same way: you send signals here, they
        > receive them there. The only difference is that there is no cat."


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.