RE: [S.u.S.E. Linux] Re: VIM bug + buglet?
On 04-Mar-98 Joshua Rodman wrote:
Hi all!
I'm a pretty new customer to S.u.S.E, so greetlings. The Oakland office is a couple blocks away, they're good folks.
I'm a bigtime ViM user (this e-mail is vim powerd), so I found the bug reports strange. As it turns out, at least one is a _feature_ :).
SNIP
SNIP
:help edcompatible returns the following:
Makes the 'g' and 'c' flags of the ":substitute" command to be toggled each time the flag is given. See 11.3 |complex_change|. See also 'gdefault' option.
So there you go. :set noedcompatible manually, or edit /etc/vimrc, or make your own $HOME/.vimrc to override it.
The question that remains: Why the goofy default?
Brilliant! Thanks for the detective work. And indeed, why the goofy default?
Even as a feature it strikes me as goofy, even if it's an "ed" question.
Though, come to think of it, I don't recall ever encountering it in this form
in old UNIX "ed": s/A/B/g *always* does global substitution, and it's supposed
to in GNU "ed" too.
Where you DO get toggling in "ed" is with the command (.,.)s ("repeat last
substitution command (for addres range .,.)") which, with "g" suffix as in
(.,.)sg, toggles the previous "g" state.
But then you have the option: without "g", no toggle, just repeat. With "g",
toggle and repeat. I can see the point of that, but not with the form s/A/B/g.
I reckon this is a "vim" design fault!
However, this ain't a "vim" list, so better stop there. But thanks for the
discussion.
Best wishes,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding)
participants (1)
-
efh@nessie.mcc.ac.uk