Groups | Search | Server Info | Login | Register


Groups > comp.editors > #106847

Re: Vim 9 - but older releases preferred

From Eli the Bearded <*@eli.users.panix.com>
Newsgroups comp.editors
Subject Re: Vim 9 - but older releases preferred
Date 2025-11-16 09:01 +0000
Organization Some absurd concept
Message-ID <eli$2511160331@qaz.wtf> (permalink)
References <10fat2b$3p5tk$1@dont-email.me> <eli$2511151801@qaz.wtf> <10fbt71$3p5tk$2@dont-email.me>

Show all headers | View raw


In comp.editors, Janis Papanagnou replied to me:
> [ Sorry for the response per email, Eli. - I'm not used to my
>    new system environment, and it's not yet set up completely. ]

Usenet is not realtime. Slow is fine. Not necessary to post and email a
response, and doing so without mentioning it is annoying.

> Or I was probably just confused about the default behavior in
> my clean new environment and about the error messages that I
> provoked with my tries to reestablish my previous configuration.

Well, no real problem them. The "clean environment" vim gets further and
further away from ordinary vi. As an example, I find scrolloff a very
handy setting on rare occaisions but annoying for regular use. It's set
as one of the clean environment defaults now.

(I complained about how scrolloff changed the meaining of "yL", the sort
of thing I do often, and Bram fixed it. Versions before then with, say,
":set so=5" would stop the yank at five lines from the bottom. That was
sometime in 2017, so a while ago. An example of how older versions had
things I'd notice as "wrong" but newer ones do not.)

>> Modelines? That's a touchy subject since modelines have been subject to
>> many security patches over the years. I don't use modelines much, but
>> have not noticed a change. I think my usage is limited to setting
>> tabstops and case insensitive search in some files.
> I don't see (and certainly never noticed) any security issues
> with those, though. But I'm anyway not using things (like script
> code) beyond some elementary settings.

Modelines change settings in your editor. When a modeline comes from a
file you didn't write, the changes may be unpleasant. When a modeline
manages to change things *besides* mere editor settings, it becomes a
security risk. The classic example is true vi allowing all ex mode
commands in modelines.

I wrote this example and posted to this group decades ago:

ex: /sig virus!$/w!>>~/.signature : Eli's vi modeline sig virus!

Since modelines activate in the first or last five lines, putting it
at the end of a post will cause it to activate for people that reply
if they have classic vi with modelines enabled. (If it is not clear,
it searches for the first line with "sig virus!" at the end, then
appends that line to the .signature file in a Unix home directory.)

>> Like I said, I've been using vim 9 for a while and don't notice
>> differences. I prefer a mostly vi compatible vim experience, however.
> Curious about 'compatible'...
> As I understand it you don't get any Vim feature with that?
> So you're actually just using old "Vi" functionality? (With
> Vi's old bugs fixed, I suppose.)

No. Compatible means that most everything vi does, vim does the same.
Some changes, like safe modelines and tag files, other bug fixes like
the lose-your-marks one that used to bother me a lot on Solaris, those
remain vim behavior. But things that would be no-ops, errors or
undefined behavior in vi, those can still work vim-style.

Some notable examples that I use regularly:

 * The g family of commands, like gq<movement> to reformat text. The
   "g" key is unassigned in vi
 * Similarly ctrl-a / ctrl-x number increment / decrement
 * Whole word search with # and * (but I remap the * to _)
 * Fancy remap commands like ":noremap _ *"
 * :new for a multiwindow view
 * multiundo

> That's interesting. While I find that old Vi contributed most
> of what's basically the actual "Vim experience", but I also
> think that Vim (Bram) managed to extend it sensibly within the
> "Vi philosophy". (I like a lot of Vim's features and I'm using
> not all but quite some that I wouldn't want to miss.)

There are many Bram extensions I don't get a lot of value from,
like vimscript, syntax highlighting, gvim, mouse integration,
and colors in my editor (eg search highlighting). But there are good
things too, as I mentioned above. I also appreciate that some of the
bugs and issues in vi that irked me (line length limits, losing marks,
the unnamed register being cleared when changing files) are fixed in
vim. And vim does a good job with UTF-8, which was not a big concern
for me in the past but I appreaciate these decades later.

Elijah
------
uses * for "execute this line" macro :map * "yyy@y

Back to comp.editors | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Vim 9 - but older releases preferred Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-11-15 22:58 +0100
  Re: Vim 9 - but older releases preferred Eli the Bearded <*@eli.users.panix.com> - 2025-11-15 23:01 +0000
    Re: Vim 9 - but older releases preferred Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-11-16 08:07 +0100
      Re: Vim 9 - but older releases preferred Eli the Bearded <*@eli.users.panix.com> - 2025-11-16 09:01 +0000
        Re: Vim 9 - but older releases preferred Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-11-16 11:42 +0100
          Re: Vim 9 - but older releases preferred Eli the Bearded <*@eli.users.panix.com> - 2025-11-17 02:23 +0000
            Re: Vim 9 - but older releases preferred Eli the Bearded <*@eli.users.panix.com> - 2025-11-17 20:19 +0000
      Re: Vim 9 - but older releases preferred Anton Shepelev <anton.txt@gmail.moc> - 2025-12-06 01:26 +0300
        Re: Vim 9 - but older releases preferred "Jeffrey H. Johnson" <johnsonjh.dev@gmail.com> - 2025-12-08 03:15 +0000
  Re: Vim 9 - but older releases preferred John McCue <jmclnx@gmail.com.invalid> - 2025-11-16 13:46 +0000

csiph-web