title: Edit a file in-place in vim
body: <p>Normally, you don't actually edit a file in vim.  If you run <code>vim foo</code>, edit, write and quit, vim unlinks <code>foo</code> and creates a new file and a new link named <code>foo</code>.  But, if the file has more than one link, then <code>vim</code> actually modifies the file.  For example:</p>
  
  <pre><code>$ ls -i foo
  19428852 foo
  $ vi foo
  $ ls -i foo
  19428857 foo
  $ ln foo bar
  $ vi bar
  $ ls -i bar
  19428857 bar
  </code></pre>
  
  <p>I've been looking around for a way to actually edit a file, and it seems there are two choices.  Use <code>ed</code>, or use <code>vim</code> but ensure that there are at least two links to the file before I edit.  I suppose the question is academic, as it doesn't really matter that vim creates a new file if there is only one link, and vim seems to do the right thing if links are created while the editing is underway, but I'm curious:</p>
  
  <p>is it possible to make vim always edit the file, and not create a new one?</p>