Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
Oh, how did I miss that. Thanks. –  Memming Oct 19 '12 at 16:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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