If I'm coding in cpp, in Vim I can do:
!g++ % && ./a.out
to quickly compile and run the code.
However, if I'm coding in Java, in Vim I can do:
!javac %
for a quick compilation, but for running the java class, I cannot do:
!java %
because I need to put the class name only (without the trailing .java suffix)
Is there a quick way in VIM to do what I did when I was coding in Cpp?
Thanks a lot.
!java %:rmay work