*editing.txt*    Vim version 6.2.   : 2003 May 04


		        VIM -  


 			  *edit-files* *_*

1.  			    |-|
2.   	    |_|
3.  			    |-|
4.   		    |_|
5.   		    |-|
6.  			    ||
7.      	    |__|
8.      |-_|
9.                  ||
10.     |__|

==============================================================================
1. 			        *edit-intro* *-*

     Vim :

1.     Vim.
2.       .
3.     .

					         *current-file* *_*
 ,   ,     . 
   (    ),   
  " ".

					      *alternate-file* *_*
  ,     ,     
  " ".      
.        (, ":e ")
    (, ":w "),     .
      , 
  Vim,        (,
   )    CTRL-^.  
        CTRL-^. 
{Vi      }

CTRL-G						   *CTRL-G* *:f* *:fi* *:file*
:f[ile]			   ,   
		          ( 'ruler' ),  
			 : Σ,   ,  
			,  .    
			,      'shortmess'.
			{Vi    }

{}CTRL-G		 CTRL-G,      
			.  {}  1,   
			  .
			{Vi    }

					  *g_CTRL-G* *word-count* *byte-count*
					             *_* *_*
g CTRL-G		     : 
			, ,   .   ,  
			  ,   
			 (<Tab>  ),   
			"" ,    , ̣
			. .     'ruler'.
			{Vi    }

							          *v_g_CTRL-G*
{}g CTRL-G	 "g CTRL-G",    , 
			   ,    .
			     
			 . (   {}
			 : |_|).
			{Vi    }

							             *:file_f*
:f[ile] {}		     {}.

:buffers
:files
:ls			    ͣ . .
			'windows.txt' |:files| |:buffers| |:ls|.
			{Vi    }

Vim     .     
 , ,      ,     ":cd"
     |:cd|.

			       *home-replace* *__*
    $HOME      
,       "~"   .
   ,     .    
     ,  "~"   
  .       "~",  
   ,     
(    'backupext'),   "~/".

    ,      . 
,    "ZZ"  ":wq"    Σ.
   ,   ,      -
 ,   ":write"  . : >

	vim testfile
	[ ]
	:w newfile
	:q

      "newfile",  Σ 
"testfile".  "testfile"   .   
'backup',  Vim        ,
   .     ,  
  . .     'patchmode'. 
  ,  ,  ,   ,  
 ,     'backupext'.  
  "~",      - ݣ,
     .   
  ".bak",    'backupext'.  MS-DOS 
   "_".       ,  Vim
,   MS-DOS-   (,
messydos  crossdos),    ,    'shortname'.
         
'backupdir'.

			      *auto-shortname* *__*
 :
	    Amiga        30 .
	   ,  MS-DOS-    
	    8+3 .    .swp Vim 
	       .  
	     MS-DOS-  , 
	     ,     , 
	      'shortname'.    
	          ͣ 
	   ".swp"  "~"   .  ,   
	     ޣ   ,    
	   ,  MS-DOS-  .   
	     ".~"   ,  ģ 
	      .     
	   'shortname'.

    ,     " ". 
  ":write"   ,    
   ,    'cpoptions'
  'F' (    ).  
            . 
 'cpoptions'   'f' (   ),   
         
":read ".    ,  Vim   , 
         ":read
".
					      *not-edited* *-*
          
 ,  Vim       . 
        , 
    CTRL-G  ":file":     
 "[ ]".      ":w!"  
 .

							   *__*
			                                  *abandon* **
Vim ,     .     
 ӣ .       
    , Vim    
 .        
 '!'.      . ,  
Σ   ":q"   ,   
 ":q!".     ,   Σ  ,
  "CTRL-G".   ,    
Σ ,      "[Σ]".

        
 'autowriteall'.   Vi-  'autowrite',
     .

       Σ   , 
  'hidden'.  . |hidden-_|.

==============================================================================
2.  	                  *edit-a-file* *_*

							          *:e* *:edit*
:e[dit] [++opt] [+cmd]	  .   
                         , Σ   .
			  ,    
			Σ ,   'autowriteall'
			. .  |++opt|  |+cmd|.
			{Vi    ++opt}

							              *:edit!*
:e[dit]! [++opt] [+cmd]
			  ,   
			  .  Σ  
			.   ,  
			    .
			.  |++opt|  |+cmd|.
			{Vi    ++opt}

							             *:edit_f*
:e[dit] [++opt] [+cmd] {}
			 {}.
			  ,     
			Σ     
			'autowriteall'  'hidden'.
			.  |++opt|  |+cmd|.
			{Vi    ++opt}

							            *:edit!_f*
:e[dit]! [++opt] [+cmd] {}
			 {},   
			Σ .     
			  .
			.  |++opt|  |+cmd|.
			{Vi    ++opt}

:e[dit] [++opt] [+cmd] #[]
			    ,   
			 ,    :files, 
			[].     []
			CTRL-^.       ,
			      ,   
			":e #"   ,     
			CTRL-^     .
			.  |++opt|  |+cmd|.
			{Vi    ++opt}

							        *:ene* *:enew*
:ene[w]			    .  
			,     
			Σ     
			'autowriteall'  'hidden'.
			   'fileformats'   ,
			      
			  ,    . 
			    
			'fileformat'   .
			{Vi    }

							      *:ene!* *:enew!*
:ene[w]!		    . Σ
			     .
			  'fileformat'   ,
			    |:enew|.
			{Vi    }

							        *:fin* *:find*
:fin[d][!] [++opt] [+cmd] {}
			 {}    ,   
			'path'       |:edit|.
			{Vi    }
			{    ,  Vim 
			  |+file_in_path|}

:{}fin[d][!] [++opt] [+cmd] {}
			 ,   ":find",   {} 
			     'path'. 
			, ":2find file" ģ   "file" 
			  ,   'path'. 
			  ,   {}, 
			    .

							                 *:ex*
:ex [++opt] [+cmd] []
			 ,   |:edit|.

							       *:vi* *:visual*
:vi[sual][!] [++opt] [+cmd] []
			  Ex:    Ex (. |_Ex|) 
			   . 
			    ,   |:edit|.

							        *:vie* *:view*
:vie[w] [++opt] [+cmd] 
			  Ex:    Ex (. |_Ex|) 
			   .     ,
			  |:edit|,     'readonly' 
			 .
			{Vi    }

							              *CTRL-^*
[]CTRL-^		    ,   
			 ,    :files, 
			[].     ":e #[]".
			   ,    
			  .   
			      (
			) . 
			   'autowrite'  'autowriteall', 
			  Σ   , 
			 . 

[]]f						             *]f* *[f*
[][f		 ,   "gf".   .

							    *gf* *E446* *E447*
[]gf		 ,    
			 (  ).  : "goto
			file,  	". 
			  ,     
			,    'isfname'. 
			 ".,:;!"    .
			    ,  
			  'path',    
			. 
			  ͣ   ̣ 
			   'suffixesadd'.
			        , 
			  ,    
			     
			'includeexpr'.
			  [],    
			       
			. 
			 Vim   ||  ,  
			  . 
			  ,   ,    
			,   : >
			
				:e <cfile>

<			 gf     , 
			: >

				:map gf :e <cfile><CR>
<			
			  ,     
			,  "type://machine/path",  
			      |netrw|.  Unix
			    '~',  
			 "~user/file".  , 
			  
			|__|.
			{Vi    }
			{    ,  Vim 
			  |+file_in_path|}

							                *v_gf*
{}[]gf	 ,   "gf",     
			     .
			  'isfname'    .
			     ,  
			      
			  . (  {} 
			: |_|).
			{Vi    }

      -
.           .
      , . |:cd|.

  ,     , 
: |-|.

      ,   
 ":e!".  ":e"     ,   
 . 

					         *:filename* *{file}* *{}*
,  ,  Unix  MS-DOS:   ,
        (,
":edit file"),     ,     
 .        ,
       (,  Amiga). ,
  ":e      "    " 
".  ,       
ͣ  (, ":next file1 file2"),     
       .

     {}.    
    .   
:

	*	   ( .. 0)  
	?	  
	[abc]	 'a', 'b'  'c'

  ,    , 
  .     MS-Windows, 
           -- 
  "path\[abc]"     ,   "["
    'isfname'.      --
   "path\[[]abc]".

	     *backtick-expansion* *`-expansion* *_-*
	                                                       *`-*
 Unix        . : >

	:e `find . -name ver\\*.c -print`

    ף   
  "ver*.c"      find.
      ,   , 
        -- .., 
          
.

    ,     
  Vim,   `={}`. : >
>
	:let foo='bar'
	:e `=foo . ".c" `

      "bar.c".  , 
     .

							     *++opt* *[++opt]*
 [++opt]      'fileformat' 
'fileencoding'   .   : >
>
	++{-}={}

 {-}   :		        *++ff* *++enc*

    ff   fileformat	     'fileformat'
    enc  encoding	     'fileencoding'

{}    .     
   . : >

	:e ++ff=unix

         
'fileformat',  "unix".
>
	:w ++enc=latin1 newfile

      "newfile"   latin1.

:       'fileformat' 
'fileencoding'.    ,        
     .

    ++opt,  .  
++opt    |+cmd|.

							       *+cmd* *[+cmd]*
 [+cmd]        
,    -  :

	+		    .
	+{}	    {}.
	+/{}	    , 
			   {}.
	+{}	 {}    .
			  {}    
			    Ex.

    {}  {}    
   .       
   .

	:edit  +/The\ book	     file
	:edit  +/dir\ dirname\\	     file
	:edit  +set\ dir=c:\\\\temp  file

 ,        
 :    "+cmd",     ":set".

						 *file-formats* *-*
 'fileformat'   ,   
  (<EOL>)  :

'fileformat'       	   		~
  "dos"		<CR><NL>  <NL>    DOS	     *DOS-format* *DOS-*
  "unix"	<NL>		    Unix	   *Unix-format* *Unix-*
  "mac"		<CR>		     Mac	     *Mac-format* *Mac-*

      'textmode'.

       <EOL>  
   .   DOS (   MS-DOS, OS/2 
Win32),   <EOL>   <CR><NL>,   <NL>. : 
   DOS     <NL>  
<CR>. .  |-|.

        .  DOS
 <CR><NL>. .  |DOS--|.

      DOS      Unix. 
     <CR><NL>  <NL> (,  
  'fileformats'  "dos"): >

	:e file
	:set fileformat=unix
	:w

 :      Unix      DOS.
     <NL>   <CR><NL> (,
    'fileformats'  "unix"): >

	:e file
	:set fileformat=dos
	:w

   'fileformats'      
 (    ),  Vim  
   ,    .  
   "unix,dos",  Vim   , ̣
  <NL> (    Unix  Amiga),   
<CR><NL> (MS-DOS).      <CR><NL>,  
 'fileformat'   "dos",    
  "unix".     'fileformats' 
"mac"       <NL>,    'fileformat'
  "mac".

  ,    'fileformat'   "dos", 
,  -MS-DOS  ,    
"[ dos]",     ,    
    . ,  MS-DOS- 
 "[ unix]",       'fileformat'
  "unix".    'fileformat'
  "mac",    ,  Macintosh, 
 "[ mac]".

  'fileformats'       DOS,  
 ,        
<CR><NL>,     "[ CR]". 
   'fileformats'      Mac,  
   <NL>,    "[ NL]".

   ,     ,  
   'fileformat'   ,  
'fileformats'   ,       
'fileformats'.

  ,      Vim
   'binary'.      
      "-b".    
  'fileformat'.    Vim  
  <NL>   <CR><NL>.

      ԣ     
'key',         
  . ||


    				         *file-searching* *-*

{    ,  Vim   
|+path_extra|}

    ޣ   'path', 'cdpath'  'tags'.
    ,    
 :

1)      :

        '*', '**' , , ݣ 
   ,     .  '*'  '**'
        Vim,   
     . 

     '*'  :   0   .

    '**'    :
      
      -    .
      -     30  ,   
	     
      -         
	   ,    '**'.
	 ,  '/usr/**2'  : >
		
		/usr
		/usr/include
		/usr/include/sys
		/usr/include/g++
		/usr/lib
		/usr/lib/X11
		....

<	     '/usr/include/g++/std', 
	    . 
	  ,      , 
	   0 ('**0'    )  255.
	    0,      
	30,    255,       255. 
      - '**'       ,  
	     ,   
	  .

    '*'  '**'     : >

	/usr/**/sys/*
	/usr/*/sys/**
	/usr/**2/sys/*

2)       :

             
    .       
   ,    .      (
    'path')     (  'tags')    ';'.
         ,   
     ';'.       ,
          ("   
    "). ,  >
	
	/usr/include/sys;/usr

<        : >

	   /usr/include/sys
	   /usr/include
	   /usr
<
         ,   
      Vim      ( 
      './'   'd'      
   'cpoptions').

   ,    Vim   
   /u/user_x/work/release    : >

	:set path=include;/u/user_x

<       |gf|    : >

	/u/user_x/work/release/include
	/u/user_x/work/include
	/u/user_x/include

3)     :

      Vim  /u/user_x/work/release    :
   >
	set path=**;/u/user_x
<  
        |gf|    : >

	/u/user_x/work/release/**
	/u/user_x/work/**
	/u/user_x/**
<
    !      
     ,    '/u/user_x/**'    
        '/u/user_x/work/**' 
   '/u/user_x/work/release/**',       
   '/u/user_x/work/release/**'   ,    
   '/u/user_x/work/**'  .

    ģ        'path' 
    : >

	:set path=**,/u/user_x/**

<       : >

	/u/user_x/work/release/**
	/u/user_x/**

<       ,     .

==============================================================================
3. 			       *edit-dialogs* *-*

							    *:confirm* *:conf*
:conf[irm] {}	 {}   , 
			     
			  .   
			   ":q", ":qa"  ":w" ( 
			":w"      ,
			   ).

: >

  :confirm w foo

<	 ,  "foo"  . >

  :confirm q

<	 ,   Σ . >

  :confirm qa

<	        
           Σ .    
	"  "  "    ".

      ":confirm" , 
  'confirm'.

			   *:browse* *:bro* *E338* *E614* *E615* *E616* *E578*
:bro[wse] {}	      
			  {}.   
			   ":e", ":w", ":r", ":sp",
			":mkexrc", ":mkvimrc"  ":mksession".
			{     Win32, Motif
			 Athena}.
			  ":browse"    
			,   ,  {} 
			     .

        : >
>
	:browse e $vim/foo
	
<		       $vim/foo  
		   .
>
	:browse e
<		         
		    .
>
	:browse w
<		        , 
		      , 
		     .
>
	:browse w C:/bar

<		       C:/bar, 
		      , 
		     .
		
.     |'browsedir'|.
   Vim,      , 
 ,        :browse.

			        *browsefilter* *____*
 MS Windows         
.   ԣ    g:browsefilter
( )  b:browsefilter (    
).        
"{-}\t{};{}\n",  {-}  , 
    " ",  {}  ,  
 .    , ̣ 
';'.

 Motif   ,    
    (Motif    
,    ).

,        Vim,  
 : >

     let g:browsefilter=" Vim\t*.vim\n  Vim\t*vimrc\n"

        , 
  b:browsefilter  g:browsefilter. 
 b:browsefilter  ϣ     , 
         .
    ,     
  " \t*.*\n",     
 ,  .

==============================================================================
4.  	                 *current-directory* *_*

    ,       ,
  |:cd|  |:lcd|.      
 ,   ":!ls".

							          *:cd* *E472*
:cd			 -Unix :   .
			 Unix:     . 
			      
			  |:pwd|.

:cd {}		     {}. 
			   {},   
			  ,    
			|'cdpath'|.
			        
			,  Vim     
			.    ,   |_|
			  !
			 MS-DOS      
			 .    ,  
			  ,  : >

				:cd %:h
<
							         *:cd-* *E186*
:cd -			     ( 
			    ":cd {}".
			{Vi    }

							       *:chd* *:chdir*
:chd[ir] []		 ,   |:cd|.

							          *:lc* *:lcd*
:lc[d] {}		 ,   |:cd|,    
			   .    
			  .
			{Vi    }

							      *:lch* *:lchdir*
:lch[dir]		 ,   |:lcd|. {Vi    }

							   *:pw* *:pwd* *E187*
:pw[d]			   . 
			{Vi    }
			.  |getcwd()|.

  ,     |:lcd|,   
   .      
 .
   |:lcd|      ϣ
  . ,      |:lcd|,
   ,    . 
         ̣
  .     ̣, 
  .
   |:cd|,     
        
.

   |:cd|       
 .         .
      ,     
  ,     ӣ    . ,
,      a:test   a:vim.   
 ":e test" ":cd vim" ":w"   a:test,    a:vim/test.
,     ":w test",     a:vim/test,
            
  ":cd".

==============================================================================
                                                           *_*
5.  		  *argument-list* *arglist* *-*

 Vim     ͣ ,    
 .        
     .

       ,  
   |:buffers|.       Vi,
       Vim.  ,   
 ,        ( 
      ":bdel").

          Vim,
 |07.2|.

         . 
,     ,    
  - ,    |:arglocal|.

       ,   
 |argc()|  |argv()|.       
.

							         *:ar* *:args*
:ar[gs]			  ,    
			 .

:ar[gs] [++opt] [+cmd] {-}			     *:args_f*
			   {-} 
			     .  
			,      Vim 
			      || 
			. .  |++opt|  |+cmd|.
			{Vi:   ++opt}

:ar[gs]! [++opt] [+cmd] {-}			    *:args_f!*
			   {-} 
			     . 
			     .
			.  |++opt|  |+cmd|.
			{Vi:   ++opt}

:[]arge[dit][!] [++opt] [+cmd] {}		    *:arge* *:argedit*
			 {}      
			  .  {} 
			   ,  
			  .
			      |:argadd| 
			   |:edit|.
			:      ,
			   ,   
			 |:edit|.
			[]     |:argadd|.
			    ||,  
			  [!]  .
			.  |++opt|  |+cmd|.
			{Vi    }

:[]arga[dd] {} ..		              *:arga* *:argadd* *E479*
			 {}   {ͣ}  
			.
			 []  ,  {}  
			     .
			       
			 ,  [].  
			  -- "a b c",     
			-- "b",      :
				
						   ~
				
				:argadd x	a b x c
				:0argadd x	x a b c
				:1argadd x	a x b c
				:99argadd x	a b c x
			
			     , 
			        
			 .     
			  . 
			{Vi    }
			{    ,  Vim 
			  |+listcmds|}
			:    : >

				:args ## x
<			
			      "x", 
			   .

:argd[elete] {} ..		           *:argd* *:argdelete* *E480*
			    , 
			{}.   {}  
			   ͣ , . |-|.
			      
			 "%".
			   ,    
			  . 
			{Vi    }
			{    ,  Vim 
			  |+listcmds|}

:{}argd[elete]	 {}    . 
			     ,  
			     . :
>
				:10,1000argdel

<			      ,
			  10-  (  1000- 
			),       1-
			 9-.
			{Vi    }
			{    ,  Vim 
			  |+listcmds|}

							   *:argu* *:argument*
:[]argu[ment] [] [++opt] [+cmd]
			 ,    [] 
			 .  []  , 
			  .   ,
			        Vim 
			  ||  .
			.  |++opt|  |+cmd|.
			{Vi    }
			{    ,  Vim 
			  |+listcmds|}

:[]argu[ment]! [] [++opt] [+cmd]
			 ,    [] 
			 .     
			 .  []  , 
			     .
			.  |++opt|  |+cmd|.
			{Vi    }
			{    ,  Vim 
			  |+listcmds|}

:[]n[ext] [++opt] [+cmd]		      *:n* *:ne* *:next* *E165* *E163*
			  ([]   
			 )    .  
			,      
			  Vim    || 
			. 
			.  |++opt|  |+cmd|.
			{Vi:   ++opt  }

:[]n[ext]! [++opt] [+cmd]
			  ([]   
			 )    .   
			   .
			.  |++opt|  |+cmd|.
			{Vi:   ++opt  }

:n[ext] [++opt] [+cmd] {-}			     *:next_f*
			 ,   |:args_f|.

:n[ext]! [++opt] [+cmd] {-}
			 ,   |:args_f!|.

:[]N[ext] [] [++opt] [+cmd]			   *:Next* *:N* *E164*
			  ([]   
			 )    .  
			,      
			  Vim    || 
			. 
			.  |++opt|  |+cmd|.
			{Vi:   ++opt  }

:[]N[ext]! [] [++opt] [+cmd]
			  ([]   
			 )    .   
			   .
			.  |++opt|  |+cmd|.
			{Vi:   ++opt  }

:[]prev[ious] [] [++opt] [+cmd]		   *:prev* *:previous*
			 ,   :Next.
			.  |++opt|  |+cmd|.
			{Vi:      }

							      *:rew* *:rewind*
:rew[ind] [++opt] [+cmd]
			     
			.   ,   
			     Vim   
			||  .
			.  |++opt|  |+cmd|.
			{Vi:   ++opt}

:rew[ind]! [++opt] [+cmd]
			     
			.      
			.
			.  |++opt|  |+cmd|.
			{Vi:   ++opt}

							       *:fir* *:first*
:fir[st][!] [++opt] [+cmd]
			 ,   ":rewind". 
			{Vi    }

							         *:la* *:last*
:la[st] [++opt] [+cmd]
			     
			.   ,   
			     Vim   
			||  .
			.  |++opt|  |+cmd|.
			{Vi    }

:la[st]! [++opt] [+cmd]
			     
			.      
			.
			.  |++opt|  |+cmd|.
			{Vi    }

							        *:wn* *:wnext*
:[]wn[ext] [++opt] [+cmd]
			      
			,    . []
			      
			. 
			.  |++opt|  |+cmd|.
			{Vi    }

:[]wn[ext] [++opt] [+cmd] {}
			     {}   
			 ,    .
			     ,  {}
			ݣ  ,     'writeany'.
			[]	     
			 . 
			.  |++opt|  |+cmd|.
			{Vi    }

:[]wn[ext]! [++opt] [+cmd] {}
			     {}   
			 ,    .
			[]      
			 .
			.  |++opt|  |+cmd|.
			{Vi    }

:[]wN[ext][!] [++opt] [+cmd] []		        *:wN* *:wNext*
:[]wp[revous][!] [++opt] [+cmd] []		    *:wp* *:wprevious*
			 ,   :wnext,    
			      
			.
			.  |++opt|  |+cmd|.
			{Vi    }

 , []      1. 
     ,    
    ( ).

    [+cmd],      
   .    'startofline',  
    ,    
     .     
    ,     
 (  ,      Ex).

         , 
    . ,  
  C        "vim *.c".
      ":n *.c"  .  Unix  
  , : >

	:n `find . -name \\*.c -print`

   ף   ,  
 ͣ       
 find.

		        *arglist-position* *_-_*
      ,      
 ,    (      
 'title'),    ,     CTRL-G.
   : 

	(file 4 of 11)

,     'shortmess'   f, 

	(4 of 11)

  ,         , 
     ,    :

	(file (4) of 11)

 ,     4-    , 
  ,   ף   . 
, ,    ":e file".


  

{Vi    }
{    ,  Vim   
|+windows|  |+listcmds|}

							           *:arglocal*
:argl[ocal]		     . 
			 Vim      . 

:argl[ocal][!] [++opt] [+cmd] {-}
			   ,  
			   .  ӣ  
			 ,   |:args_f|.

							          *:argglobal*
:argg[lobal]		     
			.   Vim    
			 .

:argg[lobal][!] [++opt] [+cmd] {-}
			     
			.     ,
			   |:args_f|.  ,  
			  ,   
			. 

 Vim     .   
    ;   ,    ,
   ,         
,     . 

          .
 ,  ,  ,    ,   ,
         ,  
|:arglocal|  |:argglobal|.


  

						                      *:argdo*
:argdo[!] {}	  {}    
			 .
			    :
>
				:rewind
				:{cmd}
				:next
				:{cmd}
				etc.
<			
			 Vim   ||    
			 [!],     .
			        
			,      
			  . 
			     
			   (  ,     
			   ).
			{}     ,
			̣  '|'. 
			{}       
			. 
			:    
			  Syntax    
			      
			'eventignore'.    
			  .
			{Vi    }
			{    ,  Vim 
			  |+listcmds|}
			.  |:windo|  |:bufdo|.

: >

	:args *.c
	:argdo set ff=unix | update

     'fileformat'  "unix"  
      *.c.

: >
>
	:args *.[ch]
	:argdo %s/\<my_foo\>/My_Foo/ge | update

  "my_foo"  "My_Foo"    *.c  *.h.  "e" 
 ":substitute"       , 
  "my_foo".  "update"  ,    
 .

==============================================================================
                                                                      **
6. 		                *writing* *save-file* *-*

:      ޣ  'write'.

							         *:w* *:write*
			             *E502* *E503* *E504* *E505* *E512* *E514*
:w[rite]		     .   
			   .  
			 ,    'readonly' 
			       - 
			.

:w[rite]!		 ,   ":write",      ,
			   'readonly'     
			   -  . 
			:     
			    ,   
			() .   , 
			   'cpoptions'  'W'.

:[]w[rite][!]	      . 
			   ,  
			     ,  
			 . 

							     *:w_f* *:write_f*
:[]w[rite] {}	
			     {}. 
			    ,  {} 
			   'writeany' . 

							                 *:w!*
:[]w[rite]! {}	
			     {}.
			   . 

					              *:w_a* *:write_a* *E494*
:[]w[rite][!] >>	
			      . 

:[]w[rite][!] >> {}
			     {}. '!'
			      , 
			{}  . 

							     *:w_c* *:write_c*
:[]w[rite] !{}	
		 	 {}     
			   (  
			   '!'). {} 
			  ,    "!:{}",  '!'
			   |:!|.

    []   ":w"   
(1,$).    ":w"   ,    
.   , ,   ,    
           ݣ  
  ":w #".    ,   'A' 
  'cpoptions'.

							      *:sav* *:saveas*
:sav[eas][!] {}	     {}. {}
			     .
			     
			.     
			 [!].
			{Vi    }

							       *:up* *:update*
:[]up[date][!] [>>] []
			  ,   ":write",  
			    ,    
			 .
			{Vi    }


  		         *buffer-write* *-*

							         *:wa* *:wall*
:wa[ll]			  ,    . 
			   ,    ,
			  . 
			{Vi    }

:wa[ll]!		  ,    ,  
			    .   
			  .
			{Vi    }

Vim      ,   Σ 
-  . . |__|.

                                                             *_*
			    *backup* *E207* *E506* *E507* *E508* *E509* *E510*
    (     ), 
      'backup', 'writebackup' 
'patchmode'.     (. 'backupcopy'). 
  'writebackup',    'writebackup',  
     .  ޣ 
'patchmode'     . 

			        *backup-table* *_-*
'backup' 'writebackup'		~

   off	     off	   
   off	     on		    , 
			     ( )
   on	     off	   , 
			   
   on	     on		   , 
			   

 ,    'backupskip'     
,      .   'backup'
 'writebackup'    . 

 ޣ  'backup'    (   ,  
  )  .   'backup' , 
  'writebackup',       
.           
.

        ,  
   ,    .   
    -,  -
        
 . |:recover|

       ,   
 'backupdir'.         ,
   .

   'backupcopy' ,      ,
    ,    
    .    
       
. 

       ,    .
 ,   ,      , 
 '!'  .

				       *write-readonly* *-_*
    'cpoptions'  'W',  Vim  
,    .   'W'  ,  
        ":w!",   
 (,       
,            
 ). 

					       *write-fail* *-*
      ,   ,
      .    
       ,     
   !    VIM   ,   
!    ,    
   .   ,     Vim  
,     .     
    ,  Vim    ,  
  .

					*DOS-format-write* *DOS--*
   'fileformat'  "dos",     <EOL>
   <CR><NL>.     
 MS-DOS, Win32  OS/2.       "[
dos]",     ,     
   <EOL>.

				      *Unix-format-write* *Unix--*
   'fileformat'  "unix",     <EOL>
  <NL>.  MS-DOS, Win32  OS/2   
"[ unix]".

				        *Mac-format-write* *Mac--*
   'fileformat'  "mac",     <EOL>
 <CR>.   ,  Macintosh,   
"[ mac]".

.   |-|     'fileformat' 
'fileformats'.

						                         *ACL*
ACL  Access Control List, "   ". ACL
         
    MS-Windows  Unix,   , 
  . 
      Vim    ACL.  
  ACL   .
    ACL         
. 

	    *read-only-share* *______*
          MS-Windows,   
   .    ,     
  ACL   NT    ,  
      .   Win32 Vim 
           
.          |:write|.

					    *write-device* *-*
     ,  Vim     
(   ).     "!", 
  .   Unix: >

	:w! /dev/lpt0

  MS-DOS  MS-Windows: >
>
	:w! lpt0

 Unix  ,        
. Vim     fifo   . 
MS-DOS  MS-Windows    :

	AUX
	CON
	CLOCK$
	NUL
	PRN
	COMn	n=1,2,3...  ..
	LPTn	n=1,2,3...  ..

       . 

==============================================================================
7.     			 *write-quit* *__*

							          *:q* *:quit*
:q[uit]			  .    
			,    Vim.   ,  
			   ,  Vim  
			||,     ,  
			      . 

:conf[irm] q[uit]	,       Σ
			     
			.  . |:confirm|  'confirm'.
			{Vi    }

:q[uit]!		      .
			  ,    
			 .     
			 ":qall!".

:cq[uit]		       .
			 . |:cq|.    
			 Manx (. |_|).
			{Vi    }

							                 *:wq*
:wq			    .   ,
			      ,   
			 .       
			,     
			 .

:wq!			    .   ,
			     .

:wq {}		   {}    .
			     ,  
			      . 

:wq! {}		   {}  .

:[]wq[!] []	 ,   ,    ,
			  [].

								   *:x* *:xit*
:[]x[it][!] []
			 ,   ":wq",     ,
			     .
			   'hidden'    , 
			      . 

							        *:exi* *:exit*
:[]exi[t][!] []
			 ,   :xit.

							                  *ZZ*
ZZ			  ,   Σ
			,   ( ,   ":x"). (:
			      , 
			     Σ   ).

							                  *ZQ*
ZQ			   Σ  ( , 
                         ":q!").
			{Vi    }


                               *window-exit* *-*

							         *:qa* *:qall*
:qa[ll]		  Vim,       
		. (      
		  ":bmod").   
		'autowriteall',       
		 ,    |:wqall|.
		{Vi    }

:conf[irm] qa[ll]
		  Vim,   ,    
		Σ . . |:confirm|.
		{Vi    }

:qa[ll]!	  Vim.      .
		{Vi    }

							   *:quita* *:quitall*
:quita[ll][!]	 ,   ":qall". 
		{Vi    }

:wqa[ll]					 *:wqa* *:wqall* *:xa* *:xall*
:xa[ll]		         Vim. 
		 Vim  ,      
		      ,  ,
		      -  . 
		{Vi    }

:conf[irm] wqa[ll]
:conf[irm] xa[ll]
		         Vim. 
		-         
		  -  ,   . .
		|:confirm|.
		{Vi    }

:wqa[ll]!
:xa[ll]!	     ,  
		  ,    Vim.   ģ, 
		          
		    -  .
		{Vi    }

==============================================================================
			                                         *edit-binary*
8.                 *-_*

 Vim    ,  Σ   
 .  |-b|    Vim   
          
,      ( 
'binary',   'tetwidth'   0, 
 'modeline'  'expandtab').      
'binary'.        .

        :

-          
  .        "R"  "r"
     .
-   'textwidth'    0.    
       ,    
    . 
-         <EOL>,  
     .   ,  
    ,    'wrap'  
   .       
  ( 32767   Amiga,    32- ;
   . ||) --        
     .        
   .
- ,   'binary'    .  
   Vim  ,       
   <CR><NL>,      <NL>     
   <NL>    <CR><NL>.
-  <Nul>     ^@.   <Nul> 
       "CTRL-V CTRL-@"  "CTRL-V 000".
  {Vi      <Nul>}
-    <NL>  ,  .    
      <EOL>     <NL>.
-       ,  Vim    
   .    ޣ  'binary'.  
     <EOL>   ,    'endofline'.
        ,  ,   
     <EOL> (    ).

==============================================================================
9.                                   *encryption* **

Vim          .
       . 

: -  ,     . 
,  ,      
.    -   
":!filter"    ":w !command"    ,  
     . 

:          
,          
  . 

       ":X",   
  .       . 
    Vim     .  
     ,    
   . 

							                  *:X*
:X	    . ģ    
	,       . ģ 
	    'key'     
	 .    Σ   . .
	 |-x|. 

      'key'.    
 ,         . 
Vim    ,     
. 

        'key': >

	:set key=

       'key'.   
,       ,   
   .    ģ,  
  .

    ,    ,  
  'key'    ,  Vim    
.       ":set",   
 -   ģ .

   'key'    ,   
  Vim.        
vimrc.

      "file",    
magic ("/etc/magic", "/usr/share/misc/magic"   ,   
   )   : >

     0	string	VimCrypt~	Vim encrypted file

:

-        
  'charconvert'.
-        .  
       .viminfo    
  .        'viminfo'.
-   ģ  ,     
     - .     .
   : (      ,
    ).
-       ,      
    !
-       ":set key="    
       Σ    . 
- 100%-   .    
  Vim  . 
-     .   4-  
    ,   6-  --    ( Pentium
  133).     -  . 
    ,   Vim   .  
       ,     . 
-      Pkzip    
      .  
     APPNOTE.TXT   Pkzip. 
- Vim   ,       
  . 

==============================================================================
                                      *timestamps* *__*
10.       *timestamp*  *__*

    Vim     .
   ,      
. 

    (|:!cmd| |_| |:read| |K|) 
       .   
      ,   Vim 
  .    Σ ,  
 ,     
|FileChangedShell|.

							         *E321* *E462*
         ,  
 Σ  Vim,    'autoread'.    
,     ,       Vim. 

:      FileChangedShell, 
   ,     
  .

   (,    
|___|)    .  ,
     ,     
Vim       ,    .

 Vim ,      ,  
   Σ ,  Vim ,  
     .     
   ,    ,    
 .   ,    .

      Vim   , 
   :

							*:checkt* *:checktime*
:checkt[ime]		   ,   Vim.
			    ,    
			  ,   . 
			     , 
			":global"     ,  
			     , 
			   ( ) 
			 .
			       
			   . Vim  
			   ,       
			 .    'autoread'  
			  Σ ,   
			 .     
			   .   
			̣  Vim,      . 
			     ,  
			     ,  
			  Vim   .
			      
			      
			  .

:[N]checkt[ime] {-}
:[N]checkt[ime] [N]
			      
			.     ̣ 
			  ,     .


        .  
 ,  Vim       :

	:   Σ   !!!
	أ    (y/n)?

  ͣ 'y',  Vim   .   ͣ 'n', 
  .    ":wq"  "ZZ"  Vim 
 ,        Σ
. 

      ,  -   
   Vim.     ,   
 ,       
  .         
 (      "diff").

        ,  ,  ,
 ,      . 

==============================================================================
vim:tw=78:ts=8:ft=help:norl:
