just found this handy vi tip on reddit

Posted by david marsh on Sun 07 September 2008

sick of :wqing your shell/perl script in vi just to run it and then opening it again to fix a bug?

you can run it straight from vi by writing to the shell escape:

:w !ksh
:w !perl
etc...

handy because it will leave you on the line that you are currently working on.

pip pip!