When opening a vim encrypted file, it prompts for the password. But if I get it wrong, vim will show me garbage. How do I tell vim to reopen the file with a new password? Even if I close the buffer and open again, it won't ask the password, and I have to quit vim completely.

(Vim version 7.2 / 2008)


From :h encryption:

If want to start reading a file that uses a different key, set the 'key' option to an empty string, so that Vim will prompt for a new one.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.