Reputation: 5777
I have a strange behaviour which I do not understand. My aim is to open a textfile in vim. The textfile is in the Maildir e-mail format within the Maildir structure.
Information regarding the file
file -I 1410209267.M96643P11892.10140.foo.bar,S=4660,W=4787:2,S
1410209267.M96643P11892.10140.foo.bar,S=4660,W=4787:2,S: message/rfc822; charset=us-ascii
head -n3 1410209267.M96643P11892.10140.foo.bar,S=4660,W=4787:2,S
Delivered-To: [email protected]
Received: by 10.100.34.16 with SMTP id h16cs22337anh;
Wed, 13 May 2009 04:48:51 -0700 (PDT)
Now the interessting part:
vim 1410209267.M96643P11892.10140.foo.bar,S=4660,W=4787:2,S
And the I get (|
symbolize the cursor):
|
~
~
How can I open the file in vim?
What I discovered, it is something with the :
in the filename. If I remove it from the filename, I can open it vim as wanted.
First Conclusion: It seems to be an issue with the file-system/OS and the handover to vim. Because, in python I can open the file with the colon in the filename.
I tried to escape the colon with \
but it did not have any positive effect. Vim seems not to find the file and open up in a new (empty) buffer.
vim 1410209267.M96643P11892.10140.foo.bar,S=4660,W=4787\:2,S
Additional information: Mac OSX 10.13.6; VIM - Vi IMproved 8.2
I found a workaround for me:
cat 1410209267.M96643P11892.10140.foo.bar,S=4660,W=4787:2,S | vim -
Upvotes: 3
Views: 229