tags:

views:

407

answers:

3

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  A: 

THere's a nice presentation by Sean Reifschneider at http://www.tummy.com/Community/Presentations/vimpython-20070225/vim.html and the "official" VIM Python Interface reference at http://www.vim.org/htmldoc/if_pyth.html -- and some shorter notes such as http://zerokspot.com/weblog/2009/02/22/getting-to-know-vims-python-interface/ and http://www.builderau.com.au/program/python/soa/Extending-Vim-with-Python/0,2000064084,339283181,00.htm -- but that's about all I know of in terms of such docs.

Alex Martelli
+1  A: 

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

Swaroop C H
+2  A: 

: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..

http://stackoverflow.com/questions/526858/how-do-i-make-vim-do-normal-bash-like-tab-completion-for-file-names/526940#526940

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.

michael