How to Execute a script directly within vi/vim
-
date_range Jan. 16, 2019 - Wednesday info
Short Answer:
You can do this in vim using the !
command. For instance to count the number of words in the current file you can do:
:! wc %
The %
is replaced by the current filename. To run a script you could call the interpreter on the file - for instance if you are writing a python script:
:! python %
KF