I want to make a shortcut for compiling C++ file. I use :map <F5> :!g++ % -o app && ./app <CR>
. How can I edit it to set output file's name, C++ file's name without .cpp
instead of app
?
For example I want the name of g++ output file to be main
when I use <F5>
when I edit main.cpp
.
NOTE: I use neovim 0.6.1