<p>I use the <code>:e</code> and <code>:w</code> commands to edit and to write a file. I am not sure if there is "close" command to close the current file without leaving Vim?</p>

<p>I know that the <code>:q</code> command can be used to close a file, but if it is the last file, Vim is closed as well; Actually on Mac OS MacVim does quit. Only the Vim window is closed and I could use <kbd>Control</kbd>-<kbd>N</kbd> to open a blank Vim window again. I would like Vim to remain open with a blank screen.</p>

If you've saved the last file already, then
```
:enew
```
is your friend (
```
:enew!
```
if you don't want to save the last file). Note that the original file will still be in your buffer list (the one accessible via
```
:ls
```
).