34

I'm trying to learn a little about python scripting in GVim, but I'm having trouble with starting. Elementary things, really.

Are there any resources / tutorials concerting python scripting in Vim out there ? Simple examples which show the basic principles, would be welcomed also.

4 Answers 4

23

Here is all I know of in terms of such docs:

Sign up to request clarification or add additional context in comments.

2 Comments

The "official" link is obsolete; check vimdoc.sourceforge.net/htmldoc/if_pyth.html instead.
@Bach Thanks. I've edited the answer as you suggested in the comment.
4

:help python-vim is a good start. The best vim resource is always at your fingertips and the sooner you get used to referring to it the better you will get at vim overall.

I got better at searching vim help with this..

How do I make vim do normal (bash like) tab completion for file names?

also :he vim-script-intro

I'd also recommend looking straight at the source of existing plugins that do something similar to what you want to do. That way you cut out the middle man and dont have to deal with blog ads and other distractions.

Comments

4

Vimscript The Hard Way

Have you checked out Learn Vimscript The Hard Way? It is an excellent read.

Scripting Vim With Python

vim 7.0 and above can be compiled with the +python flag, which gives vim Python support. This is a (albeit, somewhat extreme) path to getting the language support you want.

Links

Comments

3

Refer to the Scripting chapter in 'A Byte of Vim'.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.