E492: Not an editor command: ASM2_ora_26576.trc

Problem:

I want to open ASM trace file using vim.

[root@rac2 trace]# ll +ASM2_ora_26576.trc
-rw-r----- 1 grid oinstall 1388 Mar  7 18:06 +ASM2_ora_26576.trc

But because of filename contains + sign, my command fails:

[root@rac2 trace]# vim +ASM2_ora_26576.trc

Error detected while processing command line:
E492: Not an editor command: ASM2_ora_26576.trc
Press ENTER or type command to continue

Solution:

Indicate — (two dashes)

[root@rac2 trace]# vim -- +ASM2_ora_26576.trc

From man page of vim — means the following:

 --          Denotes  the  end  of  the options.  Arguments after this will be handled as a file name.  This can be used to edit a filename that starts with a '-'.
Advertisement