Go to the first, previous, next, last section, table of contents.

File Handling

:q
Quit buffer except if modified.
:q!
Quit buffer without checking.
:susp :stop
Suspend VIP
:w
Write the file.
:w <name>
Write to the file <name>.
:w >> <name>
Append the buffer to the file <name>.
:w! <name>
Overwrite the file <name>.
:x,y w <name>
Write lines x through y to the file <name>.
:wq
Write the file and kill buffer.
ZZ
Save buffers and kill Emacs.
:x [<file>]
Save and kill buffer.
:x! [<file>]
:w![<file>] and :q.
:pre
Preserve the file - autosave buffers.
:rec
recover file from autosave.
:f
Print file name and lines.
:cd [<dir>]
Set the working directory to <dir> (default home directory).
:pwd
Print present working directory.
:e [+<cmd>] <files>
Edit files. If no filename is given, dired current directory.
:q!
Quit vi without writing.
:e!
Re-edit a messed-up file.
:e! [+<cmd>] <files>
Edit file. If no filename, reedit current file.
C-^
Edit the alternate (normally the previous) file.
:rew
Obsolete
:args
List files not shown anywhere with counts for next
:n [count] [+<cmd>] [<files>]
Edit <count> file, or edit files. The count comes from :args
:<address>r <name>
Read the file <name> into the buffer after the line <address>.
v V
Edit a file in current or another window. File name is typed in minibuffer.


Go to the first, previous, next, last section, table of contents.