SpaceVim

A community-driven vim distribution


Home | About | Quick start guide | Documentation | Development | Community | Sponsors


Blogs > An async code runner in SpaceVim

when edit code, sometimes I want run current file. as we know vim’s build-in feature :!, but it is not running asynchronously.

here is an gif shown how we can run code within SpaceVim. the first line is showing the command, the last line is showing the exit code and the time that has been consumed. the default key binding is SPC l r, SPC means <Space> on your keyboard.

async code runner

as wrote in old blog, we can also use this feature for java, c, php, JavaScript, etc.

Instead of running whole current file, you can also execute a piece of code in a markdown file:

a = 1
b = 2
print(a + b)

image

Powered by Jekyll, Help improve this page