Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode run ruby file from terminal

The VSCode python extension has a feature to right click and run a file from the terminal. Is there a way that I can use a similar feature to quickly execute a ruby file from the terminal? Perhaps a hot key to start a new terminal session and run the current file within the ruby install directory.

like image 914
Preston Martin Avatar asked Apr 11 '17 21:04

Preston Martin


1 Answers

You can install the code-runner package opening the command palette:

command + shift + p (Mac)

control + shift + p (Windows/Linux)

Find and install it:

ext install code-runner

Then it'll ask you to reload the window, and depending which file type you're working in, you can type the ctrl + alt + n keybinding and your file output will be in the output tab.

like image 113
Sebastian Palma Avatar answered Nov 06 '22 20:11

Sebastian Palma