I'm using a simple text file in Vim as a task manager and am keeping completed tasks in an archive section of the same file. I'd like to compress that section of the buffer when saving changes to a file, but have it visible (uncompressed) in Vim.

Is there a way of achieving this in Vim?

  • You’ll probably be better off writing a tool to manage the file + compression, and have it invoke $EDITOR the way git-commit does – D. Ben Knoble Nov 22 '18 at 21:55
  • 1
    what do you mean with compress? are you talking about folding or do you really want to compress some parts of a file? – Christian Brabandt Nov 23 '18 at 7:02
  • Imagine when you open a .txt.gz. I want that, but for a section of the file. – Vitor Nov 23 '18 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.