Last Updated: September 14, 2018
·
593
· deleteman

Edit and encrypt a file with VIM

vim -x filename

Then enter the encryption key and you're done.
To edit it, just open it normally and Vim will request the key again.

Credit to @vimtips for retweeting it.

1 Response
Add your response

Note that when you set the encryption, it'll open the file for you in normal mode. :w in order to save your encryption (or :wq or :x), don't just :q otherwise your file won't be encrypted.

over 1 year ago ·