title: Remove a file's "read only" attribute in vim after editing it and saving with :w!
body: <p>I want to change the read only attribute from a file when I save it with <code>:w!</code> in vim. How do I do it? (I don't mind if I have to call an external script).</p>
  
  <p>I'm using Linux.</p>
  
  <p>I know I can use an external script using this command: <code>autocmd BufWrite /tmp/* !sh /tmp/script.sh</code>. So, I would like to call a chmod command when <code>:w!</code> is invoked: the chmod command is going to be something like this:</p>
  
  <pre><code>autocmd BufWrite &lt;:w! condition&gt; !chmod u+w %
  </code></pre>
  
  <p>So, how do I do the ":w!" condition? Is it possible or do I need to use another structure?</p>