如何在 Gvim 中打开 gzip 文本文件而不解压?
如何在 Gvim 中打开 Gzip 压缩的文本文件(*.gz)而不先解压缩它们?
How to open Gzipped text files (*.gz) in Gvim without unzipping them first ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
VimDocs 中提到的解决方案为 由 therefromwhere 回答
Solution mentioned in VimDocs as answered by therefromwhere
Vim 应该自动为你做这件事。至少对我来说是这样。还有zless。我会看看是否可以找到一个资源来讨论 vim 如何做到这一点。
Vim should do this for you automatically. At least it does for me. There's also zless. I'll see if I can find a resource that talks about how vim does this.
vim 文档中有一个示例,说明如何实现此功能: http://vimdoc .sourceforge.net/htmldoc/autocmd.html#gzip-example
就其价值而言,我不需要在 Ubuntu 10.04 (vim v7.2) 上执行此操作,它开箱即用。
There's a example in the vim docs how how to get this working: http://vimdoc.sourceforge.net/htmldoc/autocmd.html#gzip-example
For what it's worth I didn't need to do this on Ubuntu 10.04 (vim v7.2), it worked out of the box.
直接打开它们只会给你原始的二进制压缩数据。凡事都有工具,但需要正确使用它们。大锤不是用来敲鸡蛋当早餐的,文本编辑器也不是用来解压缩的。
Opening them directly would just give you the raw binary compressed data. There's tools for everything, but they need to be used appropriately. Sledgehammers are not there to break eggs for breakfast, and text editors aren't there to unzip.