4 ms·
Writing your first Vim plugin using Ruby
- qzio 16y agosimple and short to get started, I like!
- bingaman 16y agoVim needs to be compiled with Ruby support for this to work. If you're on a Mac, the default installation of vim is -ruby, but it's possible to run MacVim (which does have Ruby support) in terminal if you want to. Nice writeup though.
- nimrody 16y agoIs it really that difficult working with vim's own scripting language? Or does it limit you in some way? Requiring plugin users to have a ruby/python/perl enabled vim automatically reduces the potential userbase. And one of the benefits of vim is its widespread availability.
- sigzero 16y agoIt probably isn't that difficult but why learn yet another language (vimscript) when you already know Ruby,Python,Perl,Tcl and Scheme? All of which can be used.
- jordinl 16y agoI'm getting "502 Bad Gateway"
- Mithrandir 16y agohttps://webcache.googleusercontent.com/search?q=cache:http://thecoffman.com/2010/12/writing-vim-plugin-ruby/ https://webcache.googleusercontent.com/search?q=cache:http:/...
- jordinl 16y agothanks!
- crazydiamond 16y agoGreat. I've always wanted to write plugins. Would really appreciate if this could be followed up with a few more samples with some more functionality. Such as opening a small input window at the bottom for input and one for selection (as say in Command-T or fuzzy file finder).
- xtho 16y agoIMHO the use of an embedded interpreter really only pays off for plugins that perform a more or less complex task like parsing or something that requires functionality that VimL doesn't provide like internet access or interprocess communication etc. For simpler tasks, I'd suggest to stick with VimL.