Tuesday, March 14, 2017

Re: Minimum tabstop to get all columns aligned

Have you seen this?

https://github.com/chrisbra/csv.vim

I use it occasionally and I like it. Maybe it'll help you?

Sorry if this email is formatted incorrectly, I'm sending from my phone as I'm out of the office...
On Tue, Mar 14, 2017 at 7:31 AM Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
To get all columns aligned, you must of course know the width of the
widest column. If that can be known from the first line, it should be
possible to set 'tabstop' accordingly, depending on that first line's
format (in particular, is it a comma-separated list of column widths,
or a "format line" with a | bar representing a tab stop and repeated -
dashes between tab stops? I've seen both kinds).

See, among others,
    :help eval.txt
    :help substitute()
    :help virtcol()
    :help max()
    :help :execute

See also the vartabs plugin, http://www.vim.org/scripts/script.php?script_id=785

Best regards,
Tony.

On Tue, Mar 14, 2017 at 11:54 AM, Paolo Bolzoni
<paolo.bolzoni.brown@gmail.com> wrote:
> Dear list,
>
> Lately I often works with cvs-like files where columns are
> separed by tabs and the first line contains the columns
> description.
>
> To move around those files I setup "nowrap" and "set tabstop=40"
> (title can be long) and it works fairly well.
>
> However, I was wondering is there a way to setup tabstop to the
> minimum to get all the columns aligned?
>
> Yours faithfully,
> Paolo
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: