VimL Script language: are there any implementations in other languages? [closed]
Asked Answered
P

3

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.

Psychologism answered 28/1, 2009 at 0:14 Comment(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).Palatinate
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.Monocyclic
@Monocyclic 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, 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.Psychologism
@Psychologism 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.Monocyclic
R
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.)

Reduplication answered 15/11, 2011 at 19:26 Comment(5)
+1 because 3 emacs-haters downvoted you. Hey people it's just an effing text editor!Palatinate
If you like lisp, have a look at timl, a lisp compiled to vimL. Also riml, which borrows syntax from Ruby and compiles to vimL.Charlinecharlock
@Charlinecharlock 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.Psychologism
@Psychologism Can't. The question has already been closed.Charlinecharlock
@Charlinecharlock Nominated for reopen.Psychologism
G
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

Goulette answered 28/1, 2009 at 1:21 Comment(0)
R
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.

Rationalism answered 15/11, 2011 at 22:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.