Simon Jackson wrote:
is there a way i can run the python script that i am editing inside of vim?


Yes, if:
- your version of Vim is compiled with +python (or +python/dyn), as shown in the top half of the output of ":version" -- without that feature, you can edit Python scripts but not run them "from Vim". You can still run them as external programs (see below) but they won't be able to communicate with Vim.
- you have Python installed
- the version of Python installed on your computer is the same as the one for which Vim was compiled (as shown in the bottom half of the output of ":version"
- Vim can find your Python library -- for instance, it is in the PATH.

Then:
1. Save your work

        :w

2. Invoke it

        :pyfile %

(Arguments, if any, must be passed separately, see ":help :pyfile".)

If the conditions at top above are not fulfilled (e.g., your version of Vim is compiled with -python), you can still invoke your script as any external program:

        :!command arg1 arg2 arg3

will pass "command arg1 arg2 arg3" (without the quotes) to your shell as if you had typed it at the command prompt.


See
        :help if_pyth.txt
        :help :!


Best regards,
Tony.
--
When a fly lands on the ceiling, does it do a half roll or a half
loop?

Reply via email to