Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming

Vim 9.0 Released (vim.org) 81

After many years of gradual improvement Vim now takes a big step with a major release. Besides many small additions the spotlight is on a new incarnation of the Vim script language: Vim9 script. Why Vim9 script: A new script language, what is that needed for? Vim script has been growing over time, while preserving backwards compatibility. That means bad choices from the past often can't be changed and compatibility with Vi restricts possible solutions. Execution is quite slow, each line is parsed every time it is executed.

The main goal of Vim9 script is to drastically improve performance. This is accomplished by compiling commands into instructions that can be efficiently executed. An increase in execution speed of 10 to 100 times can be expected. A secondary goal is to avoid Vim-specific constructs and get closer to commonly used programming languages, such as JavaScript, TypeScript and Java.

The performance improvements can only be achieved by not being 100% backwards compatible. For example, making function arguments available by creating an "a:" dictionary involves quite a lot of overhead. In a Vim9 function this dictionary is not available. Other differences are more subtle, such as how errors are handled. For those with a large collection of legacy scripts: Not to worry! They will keep working as before. There are no plans to drop support for legacy script. No drama like with the deprecation of Python 2.

This discussion has been archived. No new comments can be posted.

Vim 9.0 Released

Comments Filter:
  • by carcomp ( 1887830 ) on Monday July 04, 2022 @09:34PM (#62673716)
    How do I exit this one?
  • Bravo (Score:5, Informative)

    by Tontoman ( 737489 ) on Monday July 04, 2022 @09:37PM (#62673718)
    Solid editor for highly productive developer. Now with modern future-looking script language refactor.
  • Catching Up (Score:2, Insightful)

    by SuperKendall ( 25149 )

    The main goal of Vim9 script is to drastically improve performance. This is accomplished by compiling commands into instructions that can be efficiently executed. An increase in execution speed of 10 to 100 times can be expected.

    Well this should get it at least 20% of the way to equaling Emacs Lisp from 20 years ago! :-)

    making function arguments available by creating an "a:" dictionary involves quite a lot of overhead. In a Vim9 function this dictionary is not available.

    I've done very lightweight VI script

  • Awww yeah (Score:5, Funny)

    by PCM2 ( 4486 ) on Monday July 04, 2022 @09:55PM (#62673744) Homepage

    Only a couple more steps away from VimOS.

    Then it'll be much like EMACS--great operating system, but terrible text editor.

  • by rsilvergun ( 571051 ) on Monday July 04, 2022 @10:05PM (#62673766)
    The website for the user friendly comic shutdown in February. I don't know if I missed it or what but I read slashed up pretty much every day and didn't see a story about it which is insane. I found out when I went to go look for the Vigor assistant software for Vi and it linked off to userfriendly.org and the site was dead.
    • Wow, I had no idea either! Since thy hadn't really updated for a long time I stopped visiting, kind of a loss to have all those comics vanish though...

      All I could find about shutting down was this very brief notice [archive.org] which doens't say why they shut the site down... maybe just too much money to run. :-(

      • That's really sad. Too bad it couldn't have just been kept up as a read only archive. It feels like a big piece of Internet history is lost. Regardless of how one felt about the actual humor, UF was a pretty big deal 20+ years ago.

        Then I tried to find a Something Awful JeffK joke about User Friendly, and I realized that Lowtax was dead and Somethingawful is defunct.

        I guess this is what growing older is like.

        In terms of webcomics from the early days of the web, Penny Arcade and Megatokyo (shockingly) are sti

        • Wow didn't know Something Awful is gone as well!

          Pretty happy that Penny Arcade has managed to keep going, and even growing all this time... it helps that they circle around gaming though, so it keeps things fresher over time than purely original content I imagine.

        • Re:That is sad! (Score:4, Informative)

          by tlhIngan ( 30335 ) <slashdot.worf@net> on Tuesday July 05, 2022 @03:27AM (#62674064)

          That's really sad. Too bad it couldn't have just been kept up as a read only archive. It feels like a big piece of Internet history is lost. Regardless of how one felt about the actual humor, UF was a pretty big deal 20+ years ago.

          It was read-only for the longest time - basically it ended around 2010 or so. But regular new comics stopped earlier, so much so that they published a complete archive book called 10 Years of User Friendly.org, which was 1000 pages comtaining every strip. However it was published in 2008, which while it had basically every strip, there were maybe a handful of new strips published over 2008, 2009 and 2010 before they went on permanent rerun mode.

          The sad thing is, that was the last book published, so now that book is probably the most complete collection of strips, but is still missing maybe 30-50 strips that were published since then.

          And now those strips are no longer available.

        • by colfer ( 619105 )

          It's on Wayback (link in grandfather comment). The navigation links didn't work for me, but by clicking around I got to the full archive.

        • I still follow GPF and Sluggy.
  • by The Evil Atheist ( 2484676 ) on Monday July 04, 2022 @10:37PM (#62673814)
    https://www.youtube.com/watch?... [youtube.com]

    Interview with a VIM Enthusiast 2022
  • Thank goodness! (Score:2, Interesting)

    by kenh ( 9056 )

    The main goal of Vim9 script is to drastically improve performance.

    It's amazing how slow Vim has become on my latest Intel Linux box - six 4.0 GHz CPUs and 32 Gigs of RAM and 1TB NVMe drive for storage, and STILL I sit around like a mope, constantly waiting for Vim to simply do what I want to do, amirite?

    Vi(m)was fine 35 years ago when five other college students and I were pounding away on serial terminals connected to a multi-user 68000 box in the late 80s, why must we endure 'upgrades' that do little more than whittle down the list of differences between Vim and emacs?

    h [flickr.com]

    • >constantly waiting for Vim to simply do what I want to do, amirite?

      Stop using the GUI. This isn't win95.

      • by kenh ( 9056 )

        Wooosh!

        You need to get your sarcasm detector checked...

      • by colfer ( 619105 )

        Speaking of GUI, I have a friend devoted to Wordperfect. Editing in Reveal Codes was a pleasure, that much is true, and the function keys were sensible. MS Word made everything difficult.

        On Unix terminal I just use vi. The text files I edit are simple enough, and the commands haven't changed. Yank!

        • Reveal Codes are no substitute for a WYSIWYG editor. WP5.1 would let you do accurate previews, but there's a reason actual DTP software slaughtered it, and it's WYSIWYG.

          A real WP freak can still bang out a really shitty office door sign faster, but for anything real, you want some real software. Pagemaker was literally a WP contemporary. That's why WP for DOS died.

    • by dasunt ( 249686 )

      It's amazing how slow Vim has become on my latest Intel Linux box - six 4.0 GHz CPUs and 32 Gigs of RAM and 1TB NVMe drive for storage, and STILL I sit around like a mope, constantly waiting for Vim to simply do what I want to do, amirite?

      Where are you seeing the slowdowns? I ask because in my experience, on a budget Wintel laptop, I'm not noticing any slowdown with gvim or vim.

  • If it ain't broke, don't fix it.
    • (goo='He sed'; echo -e $goo ; sed -e 's/He/She/g' $goo)

      • Code ain't quite right.

        $ goo='He sed'; echo -e $goo ; sed -e 's/He/She/g' $goo
        He sed
        sed: can't read He: No such file or directory
        sed: can't read sed: No such file or directory

        Perhaps you wanted to do this instead:

        goo='He sed' ; echo -e $goo ; echo -e $goo | sed -e 's/He/She/g'

        $ goo='He sed' ; echo -e $goo ; echo -e $goo | sed -e 's/He/She/g' He sed She sed

        • Nope it works, I forgot slashdot likes to eat < unless you quote it. #PilotError
          Bash 5.1.16, Sed 4.8

          (goo='He sed'; echo -e $goo ; sed -e 's/He/She/g' <<< $goo)
          He sed
          She sed

          This comment editor has needed an update for 20 years.

          --

  • NeoVim supports Lua, Python, JS and Ruby.
  • So this has nothing to do with the fact that Neovim's Lua showed how much better Vim scripting could be?

    • Huh? Vimscript's problems and terrible execution performance has been widely known for a long time. We didn't need a fork to tell us that.
    • I really feels like LUA was mostly a failure. Unless you are a nvim developer, their seems to be no explanation on how you would ever use it. Hell most mods/guides still tell you to add this line to your ~/.vimrc.

      Like theoretically, presumably, I could have a ~/.config/nvim/init.lua file, but no one will tell you what to put in it.

  • Have they already thrown in the kitchen sink?
  • It runs on Linux, Windows etc. There's still Emacs out there for the diehard fans, what's next Notepad+ will now get scripting too?
    Sometimes you just want to edit the file quickly and get on with life.

    • If you don't want any of this stuff and just want to edit a file, you can run vim-tiny. You can install vim-tiny as vi and full vim as vim. Or you can build vim with exactly the options you want.

  • Ah the horrenduus disaster editor that was originally designed for teletype writer terminals and fundamentally operates as if that is the platform. The editor that no-one in their right mind knows how to quit after mistakenly opening it. The editor so hideously unusable that you'd rather use ed or se. The editor only used by "professionals" so old their beards have actually fallen off, or alternatively by unprofessional young beginners trying to seem hip and deep by using an unusable editor.

    Yours,
    A dedic

    • by whitroth ( 9367 )

      Someone already responded to a post like your - you use Apple sheets.

    • The line printer mode of vi is a holdover from "ex", as vi was the "visual" display of line oriented "ex". And "ex" derived after a few steps from "ed". Also it was very common for people to start "ed" by mistake and then not know how to quit (other than to open a new terminal and kill it). Newer variants of ed have improved a bit.

      Also remember when vi came out, terminal keyboards did not often have arrow keys, or even a number pad. Thus the h/j/k/l move movement, as some keyboards had arrows printed on

  • Over the last year and a half, I've been moving from vanilla Vim to Neovim [neovim.io]. Neovim's initial goals of shedding extremely obsolete legacy support, improving performance, adding native Lua support, and decoupling the UI from the editor backend were what first piqued my interest.

    Then I discovered LSP. At the time, the Neovim ecosystem had considerably more mature support than vanilla Vim for talking to language servers which basically beat the stuffing out of ctags and cscope, whose limits I had reached lo

  • What they need to do is fix the language, I dont care as much about the speed.

    But the whole autocmd/augroup malarkey is just crazy.

Beware of Programmers who carry screwdrivers. -- Leonard Brandwein

Working...