Encryption with vim
It is possible to encrypt files with vim so that they are not readable by anyone who does not has encrypted key (password). To create a new file with encryption support with vim use:
vim -x <filename>
The created file is automatically marked as encrypted using magic flags. To edit the same file again simple:
command can also be used. Vim will automatically understand that file is encrypted and prompt for password.
Encrypting existing file
To encrypt an existing file, use following option in normal mode
To disable encryption from existing file use following command in normal mode