Execute Script Without Exiting Vim

Two ways,

Say you are writing a python or bash script, you can say

:!scriptname

This assumes you have your shebang line at the beginning of the file. This would work well.

Else do this for more options,

:set makeprg=python\ %
:make
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s