I'm trying to add a line to my .vimrc to run java.
If I type, :! basename % .java | xargs java
then all is good, but I cant get this into the vimrc without E492 Not an editor command.
I'd initially tried, nmap <leader> J :! basename % .java | xargs java
and then tried to make a :Java command, but get the error both times. Any suggestions?