home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.editors      What? Edlin ain't good enough for you?      123,932 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 123,905 of 123,932   
   Eli the Bearded to Janis Papanagnou   
   Re: Vim 9 - but older releases preferred   
   16 Nov 25 09:01:32   
   
   From: *@eli.users.panix.com   
      
   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 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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca