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

Re: Automatic tab stops

Expand Messages
  • Ben Fritz
    ... Well...it isn t as nice, but can t you script this as a plugin anyway? It seems like even less work to set the tabstop on the fly to one greater than
    Message 1 of 5 , Apr 1, 2009
      On Apr 1, 4:31 am, Tobia Conforto <tobia.confo...@...> wrote:

      > If 'tabstop' accepted a list of numbers (eg. set tabstop=11,7) I could  
      > easily write this feature as a plugin, watching every editing  
      > operation and recomputing the list of tabstops on the fly.  But alas,  
      > I cannot seem to find support for this in Vim.
      >
      > Does anyboy have any idea?

      Well...it isn't as nice, but can't you script this as a plugin anyway?
      It seems like even less work to set the tabstop on the fly to one
      greater than whatever the maximum number of characters between tab
      characters.
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... It looks like what you want is the variable tab stops feature, which is one of the unofficial patches to Vim, available in source form from
      Message 2 of 5 , Apr 1, 2009
        On 01/04/09 11:31, Tobia Conforto wrote:
        >
        > Dear Vim users,
        > I would like to have an automatic tab stop feature, while editing
        > tabular data.
        >
        > Let's say I'm editing this data:
        > one^Iplus^Ione
        > two^Iminus^Itwo
        > seventeen^Iis^Iseventeen
        >
        > I would like Vim to display it as:
        > one plus one
        > two minus two
        > seventeen is seventeen
        >
        > That is, hoping my mailer gets the spaces right, I would like Vim to
        > automatically choose a tabstop of 11 for the first tab stop, and an
        > additional 7 (or cumulative 18) for the second tab stop. These
        > numbers would be chosen automatically so that every "data column" in
        > the buffer would be correctly aligned, only taking as much space as
        > the widest cell of that column plus two spaces.
        >
        > If 'tabstop' accepted a list of numbers (eg. set tabstop=11,7) I could
        > easily write this feature as a plugin, watching every editing
        > operation and recomputing the list of tabstops on the fly. But alas,
        > I cannot seem to find support for this in Vim.
        >
        > Does anyboy have any idea?
        >
        > -Tobia

        It looks like what you want is the "variable tab stops" feature, which
        is one of the "unofficial patches" to Vim, available in source form from
        http://groups.google.com/group/vim_dev/web/vim-patches

        After you get it, you will need to apply it to the official sources and
        compile the result. See one of the following for help on compiling Vim:

        http://users.skynet.be/antoine.mechelynck/vim/compile.htm (W32)
        http://users.skynet.be/antoine.mechelynck/vim/compunix.htm (Unix)

        Also, if you decide to run that course, you may want to subscribe to the
        vim_dev group (if you haven't already) for any questions you might have
        about compiling Vim.


        Best regards,
        Tony.
        --
        Bees are very busy souls
        They have no time for birth controls
        And that is why in times like these
        There are so many Sons of Bees.

        --~--~---------~--~----~------------~-------~--~----~
        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.