Vim9script is a statically-typed language, inspired by typescript, but much simpler and more limited.
A recent PR lifts some of those limitations by adding generic functions to the language: https://vimhelp.org/vim9.txt.html#generic-functions
Vim9script is a statically-typed language, inspired by typescript, but much simpler and more limited.
A recent PR lifts some of those limitations by adding generic functions to the language: https://vimhelp.org/vim9.txt.html#generic-functions
At last night’s @mug meeting we looked at a lot of different solutions to #adventofcode day 1 in many different languages. Two that were very interesting to me were #Zig and #haskell. The way these two languages worked was really quite fascinating. After seeing real code in these two languages, I can tell they are not for me; but they were interesting and illuminating nonetheless.
There was a solution entirely in #SQL. Another in #vim9script. Another in #swiftlang #swift (I don’t think that one’s in the repo yet). I wrote several implementations myself. The one I felt most proud of is #Python with the core written in #rustlang #rust tied together with #PyO3. The one I felt was maybe the best tool for the job was entirely based on #pandas. As I said in a previous post, I tried to solve it in #polars, but the API exposed by Polars at least as far as I could tell, made it no better than simple lists in Python. I need to get deeper knowledge here.
The repo lives here: https://github.com/MichiganUnixUserGroup/MUG-2025-03-11-Advent-of-Code.
AFAIK, there's only one existing Vim plugin for buffer checksums, and it's quite old, relying heavily on terminal tools. I've developed a newer version using Vim9Script and the V language. Contributions and ideas are welcome. #Vim #VLang #Checksum #Programming #vim9script
https://github.com/sevehub/vchecksum.vim
#Vim #NeoVim I found what was replacing all my argument lists with underscores: argtextobj.vim. This is one of my favorite plugins. It hasn’t been touched in 15 years, though. Probably something changed in the editor itself that broke it. I could abandon it; I could fix it; or I could rewrite it. I asked my friend what language it should be rewritten in. He said #vim9script of course! I disagreed. That would only work in Vim. #lua would only work in NeoVim. Maybe #vimscript from just before 9. Maybe #Python. Maybe #rustlang. All three of those would run in both. I kinda don’t want to use VimScript, but that’s technically the correct choice.
Of course it would be waaay easier if it used the #lsp. Otherwise you’re parsing patterns and brackets and strings. Not sure such a solution works in plain old Vim.
What does the #fediverse say?
If you'd like to convert some of your Vim scripts and configuration to vim9script, this tool could be a useful starting point: https://github.com/ubaldot/vim9-conversion-aid
I wrote an emoji plugin for Vim in vim9script.
Check it out:
https://github.com/wolandark/vim-ez-emoji
Its nothing fancy, just two compiled functions consist of a load of abbreviations.
Does the job and is pretty quick.