I’m trying to create a shortcut to an existing command in vim. Specifically, I’m setting up eclim, and would like to call the :LocateFile command using just :LF. I’ve defined it like so:
command LF LocateFile
This works fine with no arguments, but I get an “E488: Trailing characters” if I give it a filename argument:
:LF MyFile
I’m thinking I need to stick an nargs in there somewhere, but I can’t find any examples of how it should be used in this situation.
there is the
cmdaliasplugin – it should be able to achieve exactly the thing you’re looking for – here i copied from vim-wiki