On 8/29/07, Nikolai Weibull <[EMAIL PROTECTED]> wrote:
>
>
> On 8/29/07, Yakov Lerner <[EMAIL PROTECTED]> wrote:
>
> > On 8/27/07, Mark Waggoner <[EMAIL PROTECTED]> wrote:
>
> > > set tabstop=8,10,4,20,8
>
> > You can make this in vimscript, as "userlevel" plugin.
> > By remapping the tab in i-mode an using <expr> to expand it to your
> > function.
> > Get example of simple plugin, learn vimscript, make plugin, post to
> > www.vim.org/scripts.
>
> Not in general, though.  Yes, mapping <Tab> is easy, but the problem
> is that one has to deal with the case when text is deleted as well.
> Then, assuming we have <Tab> insert the necessary number of spaces to
> the next 'tabstop', this would break.
>
> nikolai
>
There are two critical factors that make vimscript solutions undesirable:

1. This is NOT for entering text - it is for viewing/editing text that
already exists.  So any mapping solutions aren't really useful.

2. I do not want spaces added to the file to create the alignment.  The
description of the AutoAlign method sounds really close to "working" if,
before re-saving, I were to replace all the "spaces followed by a tab" with
a tab, (and maybe it already does this automatically - I haven't tried).
However, if there were a place where some text was SUPPOSED to have a space
before a tab, it would go away.

I did just try installing AutoAlign - but I get errors such as:

E486: Pattern not found: ^(t*)(.*)

when I try to use \tab on a range of lines.  No doubt I am missing
something, but I don't have time to debug it right now.

Mark

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui