I compile / run from withing VSCode using the mentioned "runner" Extension
together with some "magical" bash-script. The script is rough but supports
something similar to a "shebang" which I frequently use in my modules.
Generally it allows to "Hotkey" (F4 for me) the current active file in the
editor which compiles and runs it. It supports C/JS/PHP backends by detecting
what gets compiled.
But the hotter functionality is that you can add some simple commands to the
top of the file like in these examples:
# Next are my Visual Studio Code - Runner Script commands.
#
# nim build --hint[conf]:off
## nim build --hint[conf]:off --d:screepsprofiler
#
# world1 example for Screep
#
code...
# nim build -d:php56 -d:phpinfo --verbosity:1 --hints:off
# run nim tests -d:php56
# !run php7r dl("nim7.so"); echo ">".nim_say("World")."<".PHP_EOL;
# !run php7r dl("nim7.so"); echo ">".nim_add(123, 111)."<".PHP_EOL;
code...
# nop
# run nim build --hint[conf]:off main.nim
...for example in an module (other than main.nim)
The script is really not polished and "ugly" but here you can check it out
[here](https://gist.github.com/oderwat/cc0941fa64785426eee92ccdcdb1921a)
Usage is easy. Just copy it into your "bin" and then let "runner" execute this
for .nim targets. I guess it works for other editors too. One day I may even
create a nicer version. Basically I am waiting for a runner using the new
terminal.
EDIT: As a side note.. I just added VSCode to the Wiki. Because it is great :)