3 ms·
"feels like Vim, just different enough for you to be frustrated" is true, but I like the Lua built-in: it's a fantastic language for this kind of thing, and fee
by sewer_bird 9y ago
"feels like Vim, just different enough for you to be frustrated" is true, but I like the Lua built-in: it's a fantastic language for this kind of thing, and feels more inviting to a new plugin-writer than, say, Vimscript might.
- humanrebar 9y ago"It isn’t widely known that Vim has interfaces into several popular scripting languages: Python, Ruby, Perl, Scheme, and Tcl." https://items.sjbach.com/97/writing-a-vim-plugin https://items.sjbach.com/97/writing-a-vim-plugin
- otikik 9y agoA lot of those languages don't come activated by default on the packaged versions of Vim - Lua is one of them, at least on osx/homebrew. That strongly dissuades me from writing plugins in anything other than Vimscript. It might work for the guy who recompiles his Vim often, but it will not work on that vim instance running in your server. Ubiquity is one of Vim's main points.
- nerdponx 9y agoDoesn't Vim have Lua support too?
- humanrebar 9y agoI know there are plugins for the lua file type (syntax highlighting, etc.). I don't know if you can write plugins in lua.
- sigzero 9y agoLua is a valid language to write plugins.
- jmcphers 9y agoNeovim does, and it will be a first class scripting citizen in 0.3. https://neovim.io/roadmap/ https://neovim.io/roadmap/
- hellerve 9y agoYeah, the comment was a little tongue-in-cheek. I didn’t think just writing yet another Vim clone would be very interesting, whereas trying to keep it minimal yet usable would be an interesting challenge.
- widdma 9y agoIf you're after something lightweight, similar enough to be vim to be useable, and lua built-in checkout vis: https://github.com/martanne/vis https://github.com/martanne/vis The structural regular expressions are also pretty interesting.
- stevekemp 9y agoMy own fork of Antirez's kilo was created specifically to add Lua support: http://github.com/skx/kilua http://github.com/skx/kilua Having even basic support, for key-bindings, and reacting to events, is very useful. I wrote a console-based mail client which is configured and scripted via Lua, and would love to see Lua added to "all the things".
- alphaalpha101 9y agoI actually really like Vimscript. It has features that many popular languages lack or have only recently got, like destructuring let [file, line, col] = split("hello.c:39:10", ":") This is the sort of feature I just assumed it didn't have, because few enough real programming languages have it. The main issue I think is that there are lots of different contexts where you can put vimscript, and different bits of vimscript are legal in those contexts, or at least seem to be.