4 ms·
The thing is, Vimscript sucks. Using a more mainstream language would be great for a modern advanced editor. Vim has a ton of Vimscript plugins but I wonder ho
by oblio 5y ago
The thing is, Vimscript sucks. Using a more mainstream language would be great for a modern advanced editor.
Vim has a ton of Vimscript plugins but I wonder how long it will take the Neovim community to replicate most of their functionality in Lua. I'd guess that not that long.
- the_jeremy 5y agoI spent 10 hours learning enough vimscript to make a command to check if a line is commented, comment it if not, or uncomment if it is, be able to handle multiple filetype and comment chars, and be able to handle proper indentation and multi-line selection. I have to imagine it would be simpler in other languages. Vimscript is hard.
- psalminen 5y agoOut of curiosity, does your's have any benefits over NERDCommenter?
- the_jeremy 5y agoI'm sure mine's strictly worse. It was written when I was working in an environment where it was easier to spend 10 hours on something than it was to get permission / access to download vim plugins from the internet.
- revscat 5y agoGov?
- the_jeremy 5y agogovernment contractor, yeah. It is insane how much effort there is put into getting butts in chairs for the right number of hours and how little effort goes to actually building something useful.
- johnchristopher 5y agoNow that calls for story time.
- coliveira 5y agoThere is a point when it doesn't make any difference if the language sucks or not. What matters is if it is capable. You can say the same about most successful languages: C sucks, shell script sucks, eLisp sucks, LaTeX sucks, but they're all there and will continue to be because they have been capable of support the communities for which they were designed. Now, you can freely dream about the perfect extension language for UNIX, or vi, or TeX, or emacs, but it won't make any difference because nobody will move from something that works to an unproven extension language just because some people (usually the minority) feel that it is a more comfortable language for them.
- oblio 5y ago> Now, you can freely dream about the perfect extension language for UNIX, or vi, or TeX, or emacs, but it won't make any difference because nobody will move from something that works to an unproven extension language just because some people (usually the minority) feel that it is a more comfortable language for them. Lua ia an extremely powerful and popular extension language. It probably has at least 10x the users that Vimscript has. And people willingly choose Lua. Barely anyone chooses Vimscript, they're generally forced to use it. If anything, Vimscript is the <<unproven>> extension language. It's in Vim because Bram made it the Vim language, but it was never voted on or designed. Vimscript will most likely die with Vim, because I'm quite convinced that outside of trolling attempts, no one will adopt it for another app ;-)
- coliveira 5y ago> Vimscript will most likely die with Vim Which is just fine! Vimscript was created to create simple vim scripts, not to build full programs. And if you need to do more than Vimscript can do, Vim already provides this: it has native bindings to Lua, among other languages. If Lua was such in demand to write vim scripts, at this point it should have taken over VimScript as the main extension language, but it hasn't, and I guess that unless something huge happens in the community, it won't.
- addicted 5y agoI’m pretty sure that the primary reason we don’t have more VIM plugins, despite many more emacs users, is vimscript being terrible. If vim had a more usable scripting language it would have easily surpassed emacs in plugins and more importantly, since plugins would have been more popular, vim would have been developed in a way to make it more extensible and nvim wouldn’t even be needed.
- coliveira 5y agoThe philosophy of vim is to be able to do a lot without the need for complex plugins, as opposed to emacs' world view. That's why vim script is good only for simple scripting tasks. I think emacs having more plugins is a consequence of its design and philosophy, not the extension language itself. After all, emacs lisp is not the best language in the world and only a small group really knows it beyond the basics.
- iLemming 5y ago> emacs lisp is not the best language in the world Emacs-lisp is a Lisp. It may not be the best of Lisps, but even a bad Lisp can be far more powerful than many other non-lispy languages. To understand what makes Emacs so awesome, one has to understand the philosophy of Lisp. Emacs Lisp is not just a text editor, IDE, email client, project management tool, scientific calculator, etc. Emacs, first and foremost is a Lisp environment. Definitely not the most ideal, but certainly the best one we have today. > I think emacs having more plugins is a consequence of its design and philosophy, not the extension language itself I believe, Emacs held the crown of "the most malleable" tool for over forty years, specifically because it builds on top of Lisp. Number of plugins is not an indicator. They also have to "play nicely" with each other. I just checked - I pull over four hundred Emacs packages in my config, including built-ins and dependency libs. I just cannot imagine any other IDE or text editor with 400 plugins installed. That's just not possible.
- coliveira 5y agoEmacs lisp is not a bad language, but it's also not the reason for the existence of Emacs. It is the other way around: it was Emacs that created Emacs lisp. Initially, emacs was created on top of TECO, arguably the worst, most difficult programmable editor ever created. TECO language was so bad that they decided to switch. But emacs, the editor, was successful even running on top of a terrible language that nobody liked at the time.
- nsajko 5y ago> The thing is, Vimscript sucks. Using a more mainstream language would be great for a modern advanced editor. Lua sucks, too, and it's hardly mainstream.