You are not logged in.

#1 2009-01-24 09:04:21

Thoht
Member
From: Sweden
Registered: 2008-02-02
Posts: 75

Is it possible to execute Python code in Vim?

Hello!

I've been occasionally playing around in Python on my Mac using TextMate, where I can execute the code by pressing Cmd+R. On my netbook I installed Geany, and I can run the code by pressing F5. Is it possible to achieve something similar in Vim?

I tried searching on Google but would only get results adhering to Windows or auto-completion.


Credit to KiwiesRuleXD @ DeviantArt for the avatar.

Offline

#2 2009-01-24 10:03:46

Husio
Member
From: Europe
Registered: 2005-12-04
Posts: 359
Website

Offline

#3 2009-01-24 10:10:32

Pox
Member
From: Melbourne, AU
Registered: 2007-10-04
Posts: 66

Re: Is it possible to execute Python code in Vim?

If I understand you correctly that you want to execute the current file, it's simple: just do

:!python %

:!something means to execute something, and % is replaced with the name of the current file.

Offline

Board footer

Powered by FluxBB