I used to use vim/gvim at windows, and my old .vimrc part for compilation looked like this:
autocmd filetype cpp nnoremap <F5> :w <bar> !g++ -std=c++11 -Wall % -o %:r && %:r.exe <CR>
On windows when I pressed f5 a shell (windows cmd) would open and execute it.
However now I began using vim/gvim on linux and when I press f5 it runs on a built-in shell. Is there a way to run on a external shell? I just can open an external shell by typing :! gnome-terminal
, but how can I automatically open a shell with the compiler command like g++ main.cpp -o main, javac Main.java && java Main (whatever)
I looking for a solution for a while haha
I'm still improving my english, any critiscism is welcome!!