8

This question already has an answer here:

I am a veteran user of vi. When I started using it, there was basically nothing... Now, we have vim. But, how do I program it? Where does one start? With help? Not sure this is a good start.

marked as duplicate by Martin Tournoij Feb 22 '16 at 23:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Please reread the question. It states pretty clearly that IT IS NOT INTENDED for beginners. To the contrary, it is for veteran, fluent users, who do not understand the programming language. Oh, well. – Yossi Gil Feb 23 '16 at 13:10
  • are you sure it is a duplicate? – Yossi Gil Feb 24 '16 at 21:48
7

I can recommend Learn Vimscript the hard way from Steve Losh. It is a good tutorial which gives you most of the relevant knowledge and links you to :help when it makes sense.

  • Indeed! This is what VI users who want to become vi programmers should read. – Yossi Gil Feb 23 '16 at 13:11
4

After running vimtutor to get a handle of use of Vim (I'm surprised at how few people know the fundamentals) then yeah, :help is really the way to go. The documentation is broken into fairly logical sections so if you're looking to script Vim in interesting ways the document that'll be your primary reference is eval.txt, :h eval. That goes over syntax and all of the available functions. Pay special attention to the difference between single and double quoted strings, they beat me up for a long time...

Also ask here! And search to see if your problem has been solved already; there is a ton of information on the Stack Exchange sites regarding customizing Vim.

2

Some time back I found and played through VIM Adventures. While it is more graphical, it does teach you the keybindings in an interesting, possibly easier-to-understand way.

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