*usr_07.txt*	 Vim version 6.2.   : 2002 Jul 19

		  VIM -  

		         


     ,   .
  ,    ,   
  .          
 .

|07.1|	  
|07.2|   
|07.3|	  
|07.4|	  
|07.5|	   
|07.6|	 
|07.7|	  

  : |usr_08.txt|   
 : |usr_06.txt|    
      : |usr_toc.txt|

==============================================================================
*07.1*	  

     Vim   ,   
.    .    
,   >

	:edit foo.txt

 "foo.txt"      . Vim 
    .      Σ
,  Vim          :

	E37:    ( !,   ) ~

	:
	      Vim   . 
	     ,  ,   
	 ,        .
	,   : >

		:help E37

  ,    .  , ,   
  >

	:write

 ,    Vim  ӣ ,
    (!): >

	:edit! foo.txt
	
     ,      
 ,   ""  : >

	:hide edit foo.txt

        ,    
 .     |22.4|:  .

==============================================================================
*07.2*	 

Vim        . : >

	vim one.c two.c three.c

   Vim  ,    
 .   Vim    . 
,       ,     
  >

	:next

     Σ ,  Vim   
     ":next",      
 ":edit".   ӣ ,    ģ
  >

	:next!

   ӣ-       
 .     : >

	:wnext

     ,     >

	:write
	:next


 ?

        ,  
 .  Σ    -  "(2 of 3)". 
,       ң.
      ,  : >

	:args

     "arguments" ().  
 , , : >

	one.c [two.c] three.c

  ,     Vim. ,    
 ,    .


   

       >

	:previous

     ,    ":next",   
.         , 
   : >

	:wprevious

         >

	:last

      --  >

	:first

 ,  ":wlast"  ":wfirst"  .

  ":next"  ":previous"    .
,      ң,  >

	:2next


  

     ,     
     ":write".   ,  
  Σ ,     'autowrite',
     : >

	:set autowrite

   ,      
,      : >
	
	:set noautowrite
	

   

         
 . ,   ң  ,
  : >

	:args five.c six.c seven.h

    ,   . : >

	:args *.txt

	
Vim        .   
 Σ,         , 
   ":args!"   !   
Σ .


   ?
				  *arglist-quit* *___*
				  
    ,  Vim ,     
    .       ,
   Vim   >

	E173:    (46)

 ,     46   ,      
.        ݣ ,  
   ( ,       
  ).

==============================================================================
*07.3*	  

       CTRL-^ (
   ,    6). : >

	:args one.c two.c three.c

,      one.c. >

	:next

    two.c.   CTRL-^  ģ   one.c.
  CTRL-^ ӣ    two.c.  
Σ   one.c.    ģ  >

	:next

    three.c.  ,   CTRL-^ 
     ,    
 ":next"  ":previous".

,     ,  "".  
   Vim,  CTRL-^  ,    
.


 

         ̣
,     : >

	`"

    ,    ,   
 .  ,   ,  
 ӣ  : >

	`.

,     "one.txt". -   
  "x",   .     
    "G"     ":w".  
   ,      "one.txt"
   ":edit one.txt".      `",
 Vim ӣ    ,  `. ӣ  ,   
.     `"  `.    
   ,   ,    ӣ  
    .


 

  4          "x" 
  "mx",        
 "`x".       .   
  ,      "x",   
      .  ,   
   ,   .
        ,     
.         ? 
   ,     ,    
    . ,    "foo.txt".
    ("50%")     F: >

	50%mF
    
,     "bar.txt"    Σ  B
  : >

	GmB

    "'F"      foo.txt 
 "'B"      bar.txt   .

     ,      
-  .  ,      
,           
.
          , 
   ,    . ,   H
  , M  Makefile  C   .

 ,      ,  ţ   
  ":marks": >

	:marks M

     : >

	:marks MCP

 ,        ,  
  CTRL-O  CTRL-I    .

==============================================================================
*07.4*	  

 Vim     ,     , 
   >

	:set backup

         
 ~. ,     data.txt,   
   data.txt~.
      ,      ~,  
      'backupext': >

	:set backupext=.bak

     data.txt~     
  data.txt.bak.
       'backupdir'.   , 
    .   , 
,     . 

	:
	  'backup' ,   'writebackup' , 
	   ӣ  .   ,  
	      .  
	    ,   
	 ,        
	 (,    ,  ,  
	 ݣ).

	 :  ,      
	 ,       .
	,   ,  ,     
	    .
	

  

     , , ,  
  ,    - .   
   ,       
  ,   . 
    Vim   ,   'patchmode'.  
  ,    
  . : >

	:set patchmode=.orig

,   Σ   data.txt    
, Vim      "data.txt.orig".
         ,  Vim ,  
"data.txt.orig"       .  
    "data.txt~" (    
 'backupext').
         'patchmode'  ( ), 
    .

==============================================================================
*07.5*	   

         .  ,
  ,  ,  
.        "v". , 
  ,        "y". 
    .
     ģ ,  : >

	:edit _
	/
	vjjjj$y

  ,       .
   ,        
  "p"  . >

	:edit _
	/     
	p

,       . ,
          "V".
   CTRL-V    .  "Y"
   , "yaw"    , 
..
    "p"    .     
  "P".  ,  Vim ,   
 --     --      ,
   . 


 

          
,         
 .   ,     
 .
      ,  Vim  .    
    a  z,        .
     f: >

	"fyas

 "yas",   ,   . "f 
,       f.    
    .
          l: >

	"l3Y

 3         "l.    
  b,   : >

	CTRL-Vjjww"by

 ,     "b   
 "y".   .      
   "w",     . 
             .
        ,   
    - ݣ.  ,   
   . 

        .   
        . , 
    w: >

	"wdaw

   ,     ģ  
  "d".


  

       : >

	:write >> logfile

          "logfile" 
    ,   "logfile"  
 .         .
       ,     
 ,    ":write".   10    
    .

==============================================================================
*07.6*	 

       ,  
   .      ":w",
  ,        .
     Vim     ,   >
	
	vim -R 

 Unix       >

	view 

         .  
   ":w",       
  .
         ,    ,
Vim  :

	W10: :  ,     ~
	
  , Vim    . , 
̣     .
         ,    ,
  ģ     !,   Vim 
 .

        , 
     >

	vim -M 

          . ,
,  .     ,  
  : 

	E21:     ~

   -M     Vim  
 . , ,  ,     
   : >

	:set modifiable
	:set write

==============================================================================
*07.7*	  

         ,
     ,  . , , 
  ,         ,
   .   ,    Σ
  : >

	:edit copy.c

,     ,    
   .      ":saveas": >

	:saveas move.c

Vim        . ,  
     ":write",   
   "move.c",   "copy.c"  Σ. 
        ,   ,  
             , 
 : >
	
	:file move.c

Vim     " ".  , Vim   ,
    ,     .  
  , , ,    :

	E13:    ( !,   ) ~

       .

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

 : |usr_08.txt|   
 : . |___|  

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