title: How do I save and quit from Vim?
body: <p>I'm trying to edit a my.cnf file on a Linux server and edited using vim. After doing my edits, I am unable to escape. I have tried exiting using the following methods:</p>
  
  <ul>
  <li><code>q</code></li>
  <li><code>!q</code></li>
  <li><code>wq</code></li>
  <li><code>!wq</code></li>
  </ul>
  
  <p>None of these methods have worked. Upon exiting, it gives me the line:</p>
  
  <pre><code>shell return 127
  Press ENTER or type command to continue
  </code></pre>
  
  <p>If I do either of those suggestions, I go back to vim. Also, ctrl-c does not work. Please help. I need to end it with vim.</p>