23

Vimscript looks somewhat similar to Python code.

Can Vim be integrated with high-level language interpreters, such as Python?

Rich
  • 31,891
  • 3
  • 72
  • 139
peterh
  • 1,147
  • 3
  • 16
  • 35
  • 1
    When you have read the documentation that @derobert points to, you may find Jarrod Taylor's demo of writing python plugins helpful. He also hosts a "plugin starter kit" at his github. I don't use it, but I found reading the code and the project wiki pages to be instructive. – jjaderberg May 10 '15 at 11:34

2 Answers2

20

Yes, vim can be built with several different language interpreters available. This is something you (or your distro) picked when compiling vim from source.

Available at least are Python (as you requested), Perl, Ruby, and Tcl. The vim documentation has details for each; the python one is in :help if_pyth.txt. That document has plenty of examples.

For reference, here are the ones for other languages:

Martin Tournoij
  • 62,054
  • 25
  • 192
  • 271
derobert
  • 1,965
  • 13
  • 20
6

Yes, you can create routines with high level languages such as python, ruby, perl, among other.

To see what languages your vim supports:

vim --version
alxndr
  • 1,346
  • 1
  • 15
  • 26
avelino
  • 281
  • 3
  • 5