Vim documentation: editing

main help file

*editing.txt*   For Vim version 8.0.  Last change: 2016 Aug 06


		  VIM REFERENCE MANUAL    by Bram Moolenaar



Editing files						*edit-files*

1.  Introduction		|edit-intro|
2.  Editing a file		|edit-a-file|
3.  The argument list		|argument-list|
4.  Writing			|writing|
5.  Writing and quitting	|write-quit|
6.  Dialogs			|edit-dialogs|
7.  The current directory	|current-directory|
8.  Editing binary files	|edit-binary|
9.  Encryption			|encryption|
10. Timestamps			|timestamps|
11. File Searching		|file-searching|

==============================================================================

1. Introduction						*edit-intro*

Editing a file with Vim means:

1. reading the file into a buffer
2. changing the buffer with editor commands
3. writing the buffer into a file


							*current-file*
As long as you don't write the buffer, the original file remains unchanged.
If you start editing a file (read a file into the buffer), the file name is
remembered as the "current file name".  This is also known as the name of the
current buffer.  It can be used with "%" on the command line |:_%|.


							*alternate-file*
If there already was a current file name, then that one becomes the alternate
file name.  It can be used with "#" on the command line |:_#| and you can use
the |CTRL-^| command to toggle between the current and the alternate file.
However, the alternate file name is not changed when |:keepalt| is used.
An alternate file name is remembered for each window.


							*:keepalt* *:keepa*