In neovim, my code compiles and runs fine with this command:
:term clang++ main.cpp -o main && ./main
, but not in vim.
When I run it in Vim the code neither compiles nor executes. I get the following error:
clang-10: error: no such file or directory: '&&'
but when I do :term
, and inside it run clang++ main.cpp -o main && ./main
, it works.
&&
is a shell construct, so you need to run a shell that runs your clang command. – Christian Brabandt Oct 25 '20 at 17:35