Difference between revisions of "Encryption with vim"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Vim|Vim</yambe:breadcrumb> =Encryption with vim= It is possible to encrypt files with vim so that they are not readable by anyone who does not has encrypted...")
 
m
Line 1: Line 1:
<yambe:breadcrumb>Vim|Vim</yambe:breadcrumb>
<yambe:breadcrumb self="Encryption with vim">Vim|Vim</yambe:breadcrumb>
=Encryption with vim=
=Encryption with vim=


Line 29: Line 29:


Learned from http://vim.wikia.com/wiki/Encrypt_a_file_without_leaving_traces and http://vim.wikia.com/wiki/Encryption
Learned from http://vim.wikia.com/wiki/Encrypt_a_file_without_leaving_traces and http://vim.wikia.com/wiki/Encryption
<yambe:breadcrumb self="Encryption with vim">Vim|Vim</yambe:breadcrumb>

Revision as of 08:53, 12 September 2018

<yambe:breadcrumb self="Encryption with vim">Vim|Vim</yambe:breadcrumb>

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


<yambe:breadcrumb self="Encryption with vim">Vim|Vim</yambe:breadcrumb>