On 2009-05-20, Linda W wrote:
> Sometimes I create/change modelines on the fly as a I create or
> modify a file and want to see the results of my changes w/o saving
> (or exiting/re-entering).
>
> Why don't simple modelines work in 'set'?
>
> i.e. I often have trivial tabs-setup modelines I add at the end
> of a new file, like:
>
> : vim:ts=4:sw=4:si
> or in text
> : vim:et:sts=4:sw=4:nosi:ai
> ...etc.
>
> What I'd like to do is type
> :set ts=4:sw=4:si
>
> But I get an 'invalid argument'.
>
> Is there a reason why the multi-set syntax is prohibited/disabled during
> interactive input mode? Is there a flag to enable it?
The separator between multiple "set" arguments on the command line
is a space, not a colon. Go to
:help :set-verbose
and read the immediately preceding paragraph. In fact, in that
context, a colon is treated as an equal sign. See
:help :set-args
I don't know why a colon is treated as an equal sign in that context
but is treated as a separator in one of the two modeline forms (see
":help modeline").
Regards,
Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---