.glabels generated files, which are gzipped xml. When I rename file to have suffix
.xml.gz, then VIM properly recognizes file and it's editable, human readable xml. After edit I have to rename back to original name.
What I try to open e.g.
x.glabels file without renaming, what happens is that I see binary data. It does not ungzipped it.
How to force Vim from command like to treat given file like
If possible please make answer more general, to address general problem : how to make Vim , treat file
.extension1 as file
http://glabels.org/ uses gzipped xml, so instead of
.glabels extension, they could use
When I rename file by adding
.xml.gz extension, VIM properly picks it up.
.glabels extension it treats files like binary.
Question : How to force VIM from commandline to open given file (e.g. "x.glabels") like another type (e.g. "x.xml.gz") ?
No Answers: I know I can make symlink or temporarily rename file. I wonder about VIM flags.
Bonus Addition to answer:
You are welcome to include in your answer nice way of configuring VIM to treat e.g.
.xml.gz, but this won't be accepted as full answer, as I look for onliner that I can use on any machine I will have to deal with. Still, information about config might be helpful for other readers (or my main machines;) ).