I switched a few years ago,and ever since Lua plugin support the Neovim ecosystem is thriving.
I switched a few years ago,and ever since Lua plugin support the Neovim ecosystem is thriving.
However, I use Emacs and VS Code for more involved editing, and mostly use vim as a light remote editor via SSH, so my priorities may be very different.
- https://qa.debian.org/popcon.php?package=vim
- https://qa.debian.org/popcon.php?package=neovim
- https://qa.debian.org/popcon.php?package=nano
(nano for the control group)
So lots of neovim growth, but still small in absolute numbers. Then again, vim-tiny is installed by default. Normal vim is a better indicator. And it won't grow as much, because Debian's userbase grows slowly.
Personally I'm happy with the default Vim config (I'll enable features if I need them, such as line numbers) and prefer the minimalism.
I tried neovim but there were more bells and whistles by default, and I didn't want to waste time configuring (and I work on a bunch of machines when wearing my sysadnin hat). For plugins, I only use a debugger.
94000 installs for vim
4000 installs for neovim
Exact values are 94171=81618+5727+6826 for vim + vim-gtk3 + vim-nox, and 3980 for neovim. I ignored vim-tiny, which is installed by default.I see the neovim community holding up lua as a holy grail, rewriting entire vimrc configs just for the sake of it (even though a vimscript vimrc is much easier to read than a lua one) and rewriting rock solid existing vim plugins in lua, resulting often in a less stable and less feature complete plugin. But hey, it's now written in lua so it MUST be better!
https://news.ycombinator.com/item?id=31908731
A few highlights:
* "If it ain't broke, don't fix it"
* People don't like Lua (or just simply prefer VimScript)
* Divergence over time means that they are not still compatible.
Lua is not my favourite language, but I'd sure take it over vimscript.
:shock:
Lua, on the other hand, won't give me an error if I mistype a variable name, and the ecosystem doesn't really have good static analysis tools to catch these kind of silly errors. There's some other things I don't like either, like how "arrays" are really just hashmaps, as well as some other things. The whole versioning story wrt. compatibility is also annoying (it's basically a Python 2/3 story with every single Lua version).
It's not Lua is horrible, but the fawning over it from some Neovim people is something I always found curious, like it's a fantastic brilliant language. Meh, I found it quite average overall, at best. And if I look at some Lua vimrcs or plugins then it's all a lot more verbose and awkward than VimScript.
Not that VimScript is perfect by any means, but overall I find it's quite a decent DSL for an editor.
Through the use of metatables you can improve the undeclared global situation[2], through I admit it's kludgy.
We use luacheck for static analysis, but I'll admit it's far from perfect. The language doesn't lend itself well to static analysis.
I think what lua mostly has is a really good embedding story. It's a tiny C library with broad compatibility and a permissive license; and with LuaJIT it's also very fast (though less portable). This means it's used everywhere and a lot of people are at least passingly familiar with it. Vimscript on the other hand is fairly alien.
[1] https://luajit.org/extensions.html
[2] https://github.com/CorsixTH/CorsixTH/blob/master/CorsixTH/Lu...
Lua has pretty good lsp server and it gives me good warnings and completions.
Who doesn't like Lua? That is right up there next to disliking kittens and puppies...
They're both valid options and it's just about preference.
I might be wrong, but I think math favors different starting indices based on the subject matter. I've seen Analysis textbooks favor 0 as the starting index. I don't think there's a clear argument for cultural transference from math.
I'm opposed to starting index from 1 because I think departure from very mainstream programming tradition should have a strong reason beyond preference, even if the de facto tradition appears equally capricious.
Saying the "the zeroth element" is just... weird and slightly nonsensical.
1 is something and it fits very well for the first position... outside of programming :-)
In 0-based indexing, the index of an item is the number of items you've already seen, excluding the one you're looking at.
Aesthetically, it is repulsive, but when actually writing code in Lua, it was not much of a problem. I felt much stronger about "do"/"then" and "end" versus curly braces for delimiting blocks.
~= instead of !=
# instead of len()
Default declaration to global
-- for comments
Dereferencing something that doesn't exist returns nil
Really surprised to see /Debian/ of all things pick Neovim, especially years ago when it was even newer, as a default over Vim and would love to see the discussion around it. It would have been ~v0.2 for Stretch and ~0.3 for Buster, and only a year old during Jesse.