How to open VIM from a crystal program?

I couldn’t find it on,, or but someone on Gitter mentioned\["EDITOR"\], args: {"myfile.txt"})

When I run crystal src/ the program just terminated after about a second and I don’t see VIM.

I posted it also on reddit so instead of commenting both here and there i’ll just link to the reddit discussion: does not connect stdout, stderr and stdin by default, you need to do it explicitly:"vim", output: :inherit, error: :inherit,  input: :inherit)

EDIT: Or actually just use system: system("vim").

1 Like