Difference between revisions of "Encryption with vim"
m |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Text editors]] > [[Vim]] > [[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: | 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: | ||
Line 31: | Line 30: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Text editors]] > [[Vim]] > [[Encryption with vim]] |
Latest revision as of 15:49, 24 August 2022
Home > CentOS > CentOS 6.x > Text editors > Vim > 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:
vim <filename>
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
:X
Disable encryption
To disable encryption from existing file use following command in normal mode
:set key=
Learned from http://vim.wikia.com/wiki/Encrypt_a_file_without_leaving_traces and http://vim.wikia.com/wiki/Encryption
Home > CentOS > CentOS 6.x > Text editors > Vim > Encryption with vim