4

I have been using VIM for quite some time now and I wish to level up my VIM skills. I have started going through some VimL or vim script as it's called.

  1. To motivate me further, I am just curious to find out, are there any other potential advantages of learning VimL/vimscript apart from being able to develop and understand plugins for VIM ?
  2. Kindly provide/suggest other application which uses VimL (if at all) apart from VIM plugin development?
  3. Is there any other use-case/application of VimL?

Any projects (not focused on vim plugin development) using VimL as the main language would also be an interesting information worth mentioning.

closed as primarily opinion-based by Naumann, muru, statox Apr 27 '18 at 11:37

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

4

Vimscript is used to customise the behaviour of your editor, and the uses to which you can apply it are literally endless.

Note that the boundary between Vim configuration and Vim scripting is pretty fuzzy: in many respects, if you have a .vimrc file, then you have already started learning Vimscript, because Vimscript is what that file contains.

Note also that a plugin is just some Vimscript neatly packaged up, often (but not always) so that it can be distributed and used by other people. Many plugins started out as just a bit of Vimscript in someone's .vimrc, and then gained functionality and grew until the author decided to split them out into a plugin.

So yes: if you ever want Vim to do anything differently from how it would if you started it with vim -Nu NONE, then there is lots of benefit to learning Vimscript, even if you don't intend to develop and release any plugins yourself.

Plus it's just fun.

On the other hand, your question about whether anyone uses Vimscript for any projects that aren't related to Vim development doesn't really make much sense. There are no interpreters for Vimscript other than Vim, so anything you develop in Vimscript must run inside Vim, even if it's not strictly speaking a plugin.* This implementation of the game Snake doesn't really have anything to do with editing text, but it is still a Vim plugin.

And while Vimscript is Turing complete and thus could in theory be used for pretty much anything, in reality it's very tailored for the task of customising Vim's behaviour, and has many rough edges, so its utility for building code that is completely unrelated to Vim (other than using it as an installation platform) is pretty limited.

* If you wrote 10,000 lines of Vimscript and told anyone that wanted to use it to copy and paste it into their .vimrc, that's not a "plugin".

  • Very interesting answer. Thankyou, i am playing snake on vim right now XD – Avi Mehenwal Apr 27 '18 at 11:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.