I am trying to define my own command in MacVim to include a c statement or a range of statements in comments. So I put this in my vimrc:
command -range Com :<line1>,<line2>s?^.*$?/*&*/?
It works fine if I just type: Com to comment out the current line. But if I type something like: Com 3 5 to turn lines 3 through 5 into comments, I always get this error message:
E488: Trailing characters
Can anyone help?
source
share