Ad

brayden
asked May 10 2017
Answer
Create a file with -x option to protect or encrypt the contents.
For example:
# vim -x test.txt
It will ask for the new password. Once its set no one can access (View/Edit) the file without password.

jagannatharumugam
asked May 10 2017
edited Oct 05 2018
how to set password for VIM file
how to set password for the newly created file using VIM editor?