10

Problem: One of my favorite aspects of Vim is its flexibility. One of my least favorite is the VimL script language itself. I know everyone has his or her own preference for languages and editors, so I take it for granted that not everyone agrees with me.

Question: If you are a Vim user, and if you have had a similar disaffection for using VimL to extend vim, what alternatives have you used in order to extend Vim while avoiding the default language? I am looking for ideas that may help beyond what I've already tried, including, but not limited to:

  • recompiling vim with the add-on support for python, ruby, and perl (nice, but it does not help when I am running vim on someone else's machine without that support added in)
  • never writing a line of VimL script and simply download preexisting add-ons (great, if and only if the existing stuff does exactly what you want it to, not so great if you have to make a change and end up having to look at more VimL script)

Disclaimer: Note, this is not a slam against VimL script or anyone's preferences. If it works great for you, that's great! I'm just asking those who have found a need for an alternative, and a way to fulfill that need to their satisfaction.

Update: This question was updated with a request for specific references to specific tools. No discussion, debate, polling or extended discussion is needed. If there exists a specific tool, please feel free to reference it.

dreftymac
  • 27,818
  • 25
  • 108
  • 169
  • 4
    You know, I have no idea why your question was closed as "not constructive". I could care less about VimL, but this likely is a constructive question for somebody (besides you). – Camilo Martin Jan 02 '12 at 04:05
  • 1
    You can't eat all your cake and then be upset that there is no more cake for you to eat. If you want to write scripts in another language it will have an external dependency and will not work on every Vim installation on every computer. You can either write in VimL or write in a different language and have it be even less universally compatible. Even if Vim added support for another language you would still need to be on a new enough version of Vim to support it. Even VimL scripts do not always run correctly on every version of Vim or on every OS. – still_dreaming_1 Apr 05 '16 at 13:01
  • 1
    @still_dreaming_1 Point well taken. Nevertheless, the advantage of asking a (ostensibly impossible) question here on SO is that one may very well be surprised by the answers. For example, https://github.com/luke-gru/riml seems like it might actually provide an alternative syntax that compiles to VimL. It would have taken a much longer time to discover the existence of that tool if it had not been for SO. – dreftymac Apr 05 '16 at 13:08
  • 1
    @dreftymac I wish I could + your comment multiple times. It is the best thing I have seen anywhere on SO that was not written by myself. – still_dreaming_1 Apr 05 '16 at 13:26

3 Answers3

4

I love vim but hate VimL. So I have been trying emacs with the evil plugin. It's a vim-like mode, but with all the benefits of emacs plugins and emacs-lisp as a scripting language. Mostly a win. (It's not 100% like vim — for example, $ isn't a special line column like it is in vim — but close enough.)

Steven
  • 804
  • 8
  • 18
  • +1 because 3 emacs-haters downvoted you. Hey people it's just an effing text editor! – Camilo Martin Jan 02 '12 at 04:08
  • 1
    If you like lisp, have a look at [timl](https://github.com/tpope/timl), a lisp compiled to vimL. Also [riml](https://github.com/luke-gru/riml), which borrows syntax from Ruby and compiles to vimL. – weakish Nov 25 '14 at 16:09
  • @weakish Would you mind converting your comment to an answer? I would like to up-vote your answer and credit the response, as riml is exactly the kind of thing this question is looking for. – dreftymac Apr 05 '16 at 13:32
  • @dreftymac Can't. The question has already been closed. – weakish Apr 07 '16 at 09:35
  • @weakish Nominated for reopen. – dreftymac Apr 07 '16 at 14:56
3

Most likely whatever fits your development ecosystem. ie a language you're likely to use outside just vim itself as it has helpful support libraries

I personally used +python in this trac plugin

http://www.vim.org/scripts/script.php?script_id=2147

after extensively using and learning from this awesome debugger script...

http://www.vim.org/scripts/script.php?script_id=1929

As far as working on other machines usually you just live without stuff for small jobs. but you can always use netrw for scp etc if needed..

but really it's whatever you want to learn and can use

michael
  • 10,929
  • 2
  • 24
  • 25
3

There are no alternatives, if we disregard the ones you mentioned.

  • While in Vim you can use VimL
  • If you wish to program in Python/Perl/Ruby you can find yourself a pre-made binary, or build Vim to include support for it, and then use one of those, as many people do
  • you can download plugins, as you said, but more and more of them require support for one of the above (which are often found on *nix boxes, so it's really not that much of a problem)
  • you can use either one of the above, or other *nix tools outside Vim, but that has no longer anything to do with Vim

I think that covers it.

Rook
  • 54,867
  • 44
  • 156
  • 233