MacVim shows strange characters "^@" at the end of files
I have a problem editing files from my server. Every time I open a file, macvim shows strange characters at the end of the file. Something like this: "^@^@^@^@^@^@^@^@"
I've tried deleting these strange characters, but 开发者_如何转开发they appear every time I open the file again.
These characters only appear when I edit files of an external server.
Here is a screenshot of the problem. http://d.pr/mAbR
Anybody knows how can I fix it?
Regards,
Will
The ^@ in Vim usually indicates the existence of null bytes in the data.
You should provide some more clarification of what you mean by "external server". I.e. Are you editing the files over a network mount, are you remote logging into the server and running vim on it, or are you transfering the files to your local system before editing.
Try using another program to read the file to see if the null bytes are present in the actual data or if it is macvim-only problem.
If you have the command 'od' on your system, you can use it on the file to see if it indicates the existence of null bytes in the data. Something like 'od -c [file]' should work. This will generate a ASCII-based dump of the file.
精彩评论