I recently stumbled upon (no not the service) Vi Improved also known as VIM and had planned to use it as my text editor of choice… Being a noob i had no idea how to run my code, but i stumbled upon this neat set of code.
You have to enter command mode, so press Esc.
Then type the following command without the quotes:
“:set makeprg=python\ %”
This allows you to run python code from the editor. If you were coding in ruby you would just switch out python with ruby so:
“:set makeprg=ruby\ %”
“:set makeprg=perl\ %” for perl.
To run code you save the file and then type in without quotes: