Inspecting and manipulating .tar.gz archives using Vim

Yesterday I found out about yet another Vim feature I didn’t know about previously. You can inspect the contents of .tar.gz archives and even write to files inside the archive using my favourite editor.

Simply open the archive:

vim foo.tar.gz

You’ll be presented with a list of files contained in the archive and can open any of them by moving your cursor to the corresponding line and pressing enter. Then just edit the file like you normally would and save it. The contents of the file will be saved inside of the archive just as if it where residing in a normal directory.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.