title: How can I save a file I opened in vim as the wrong user?
body: <p>This happens to me all the time. I login as a normal user and start editing a file using vim. After editing is done, when I try to save the file, I don't have enough permission to save the file. I have to close the file, login as root and start editing again. Below is the given error in vim:</p>
  
  <pre><code>E45: 'readonly' option is set (add ! to override)
  </code></pre>
  
  <p>Or in plain vi:</p>
  
  <pre><code>File is read only
  </code></pre>
  
  <p>Is there a way to save without leaving the editor?</p>