On Sat, 6 Oct 2007 21:41:22 +0200, "Yakov Lerner" <[EMAIL PROTECTED]>
wrote:

> On 10/6/07, Matthew Winn <[EMAIL PROTECTED]> wrote:
> >
> >     :set ts=5,7 ts+=3 ts?
> >     tabstop=5,73
> >
> > Not a very useful ability.
> 
> Wrong. On a comma-separated string option, += normally
> adds the implied/needed comma.
> 
> Try this:
>     :set ve= ve+=block ve+=insert ve?
>     virtualedit=block,insert
> Notice how += adds the comma ?
> 
> Your example above is not how += usually behaves on the
> comma-separated string options.
> 
> On the comma-separated string option, your example
> should look like this:
>     :set option=5,7 option+=3 option?
>     option=5,3,7
> , not 5,37.
> 
> Then it sort of starts making sense, no ?

Yes. I'll look into that, although tabstops are different because
they're not unique. If the existing setting is "8,12,8,4,8" and you
do -=8 which 8 should be removed? But appending should certainly work.

I've been thinking about it, and I reckon I can make new options work
reasonably logically with old options. Internally, all the code will
use the new options. Setting ts also sets vts (assuming the new option
is called vts), while setting vts causes ts to be left alone and
ignored until vts is cleared. I did think about setting ts to the
first value of vts, but I couldn't see any reason why the first value
should be preferred over any other, and having the old value of ts
left in place and ignored allows it to be "restored" by unsetting vts.

I'm not entirely sure about "variable" tabstops, as tabstops have
always been variable. The phrase used a month ago was "non-uniform",
but that makes for unwieldy option names. I'll stick with variable
unless some better name comes along.

Thanks for your input.

-- 
Matthew Winn

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

Raspunde prin e-mail lui