In vi Editor How to Open Files Starting with + (Plus) or – (Hyphen) in Name

Using vi editor if you want to create a new file or open an existing file having a name starting with + (plus) or - (hyphen), you’ll get an error like the one below:

$ vi -test.txt

E433: No tags file
E426: tag not found: est.txt
Press ENTER or type command to continue

Using double quotes or escape characters won’t help. You have to use -- to allow + or - at the beginning of the file name.



$ vi -- -test.txt
$ vi -- +test.txt
In vi Editor How to Open Files Starting with + (Plus) or – (Hyphen) in Name
Be The First

Join our list to get instant access to new articles and weekly newsletter.

Tagged on:             
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x