4 ms·
vimscript really is an abomination. vim users of the world unite! and create a proper macro language for your editor. and no: running an external python/ruby/br
by factorizer 15y ago
vimscript really is an abomination. vim users of the world unite! and create a proper macro language for your editor. and no: running an external python/ruby/brainfuck process does not count.
- fferen 15y agoI dunno, I think the Python interface is adequate. Not great, but gets the job done. I write almost all my Vim scripts in Python.
- sashahart 15y agoUsing Python and other runtimes is often kind of slow - it's not a huge deal but if you have a lot of this stuff in your config, then vim might start up only like 8 times faster than Eclipse. The other thing is that the Vim API you use in these other languages is pretty much Vimscript anyway. For me, Vimscript is basically a normal imperative language in the general neighborhood of perl and shell... I agree it is more awkward to write than Python, particularly with escaping. But it's a decent DSL for configuring text editors, and Python isn't as much.
- fferen 15y agoThe two advantages of using Python for me are being able to use utilities I've already written, and the comprehensive standard library. For example, I wrote a macro to split long Python function calls into multiple lines, and I could access a parsing function that I already wrote, along with Python's own compile() to detect when I've parsed a complete expression (yes, this one is Python-specific). I also wrote a macro to submit the current file to a private pastebin, and AFAIK you can't make web requests with Vimscript.