Is it possible to auto unzip/zip *.gz
files within vim?
To use, simply open the file in Vim: :e my_file. zip and Vim will display a list of the contents and directory structure.
You can unzip GZ files in Linux by adding the -d flag to the Gzip/Gunzip command. All the same flags we used above can be applied. The GZ file will be removed by default after we uncompressed it unless we use the -k flag. Below we will unzip the GZ files we compressed in the same directory.
My vim installation does this by default.
VIM - Vi IMproved 7.3 (2010 Aug 15) on OpenSUSE 12.1
Also, check this link: http://ubuntuforums.org/showthread.php?t=902668
zip/unzip
cannot open *.gz
files as far as I know.
Vim can open *.gz
files with the help of gzip/gunzip
like this
Its already discussed here on SO
How to open gzip text files in Gvim without unzipping?
I have searched for this answer as well, specifically for Fedora.
So on Fedora, you need to install the package vim-enhanced
:
sudo dnf install vim-enhanced
Now it is possible to just edit gzipped files like this:
vim my.log.gz
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With