Skip to main content

How to compile a program and open the output in a vertical terminal window?

How can I write a command that does the following?

  • With one mapping, compile and/or run a program based on the filetype (*.c, *.cpp, *.js, *.py, etc.), and open a vertical terminal window with the output.
  • With another mapping, close the vertical terminal window.

I know you can open the terminal next to Vim with tmux, but I want to do it with just Vim.

Visrut
  • 125
  • 6