title: Ubuntu not saving vi directory, get error e502: is a directory
body: <p>Using Ubuntu, Linux</p>
  <p>after executing --  <code>mkdir directname</code></p>
  <p>then --  <code>vi directname</code></p>
  <p>then write in what I need to inside it,
  It will not save --  <code>:wq</code> or <code>:x</code></p>
  <p>but only --  <code>:q!</code></p>
  <p>which does not save what I have tried to create.</p>
  <p>I get the error message --
  <code>e502: &quot;directname&quot;  is a directory</code>.</p>
  <p>There is no directory by that name yet. So how can I save my edits, and what am I doing wrong.
  Thank you.</p>