*repeat.txt*     Vim version 6.2.   : 2003 Apr 25


		        VIM -  


 ,  Vim   	      *repeating* **

        26  
|usr_26.txt|.

1.  		|_|
2.  	|_|
3.  		|_|
4.   Vim	|_|
5.  		|_|

==============================================================================
1.  		        *single-repeat* *_*

							                   *.*
.			   ,  
			    [].
			    'cpoptions'  
			'y',       
			. 

       ".".  
  ,   [],     
 .      
 ,       . 
      
|-|.  ,    , 
  ,      - 
. |_|.

							                  *@:*
@:			     
			 [] .
			{    ,  Vim 
			  |+cmdline_hist|}

==============================================================================
2.  	     *multi-repeat* *_*

						  *:g* *:global* *E147* *E148*
:[]g[lobal]/{}/[]
			  Ex,    []
			( : ":p")  ,   
			[],    
			{}.

:[]g[lobal]!/{}/[]
			  Ex,    []
			( : ":p")  ,   
			[],     
			{}.

							       *:v* *:vglobal*
:[]v[global]/{}/[]
			 ,   :g!.

    :   []
     . ,  
     .  , 
   ,      
.
   []    ; 
,      .  ":v"  ":g"
        
 .    ţ  .
    []    (1,$). 
      "CTRL-C".    
- ,      , 
        .

  ,    Ex,   
":normal": >

	:g//normal {}

,  {}  ,  Vim    
     .     
     ,  . . |:normal|.

         .
        ( 
 "''"     ,    
  .

       ,
      (  
Vi-).    ̣    
: >

	:g//s///g
	
       "" 
"".        : >

	:%s///g


, ,    !

==============================================================================
3.  		        *complex-repeat*  *_*

					      *q* *recording* *_*
q{0-9a-zA-Z"}		     
			{0-9a-zA-Z"} (,    
			     
			).  'q'      
			     .
			{Vi    }

q			 . (  : 'q' 
			     ,  
			,     
			).
			{Vi    }

							                   *@*
@{0-9a-z".=*}		   
			{0-9a-zA-Z".=*}  [] . 
			,   '%' (  ) 
			 '#' (  )  
			.    "@=" Vim
			   ,  
			 . .  |@:|.
			{Vi    }

							                  *@@*
@@			   @{0-9a-z":*} 
			[] .

:[]*{0-9a-z".=}				     *:@* *:star* *:ף*
:[]@{0-9a-z".=*}	   {0-9a-z".=*}  
			Ex.        
			[] ( :   ). 
			       <CR>, 
			   ,    
			'cpoptions'   'e'.
			 ,   ":*" 
			   ,     'cpoptions'
			  '*'.     
			,   'nocompatible'.
			  ":@="   
			 .  
			   Ex.
			     .
			{Vi:     
			}
			   :  
			      
			.

							                 *:@:*
:[]@:		     . 
			      
			 [] ( :   ).
			{Vi    }

							                 *:@@*
:[]@@		   :@{0-9a-z"}. 
			      
			 [] ( :   ).
			{Vi:     
			}

==============================================================================
4.   Vim	     *using-scripts* *_*

     Vim  
  41   |usr_41.txt|.

		     *:so* *:source* *load-vim-script* *__vim*
:so[urce] {}	  Ex   {}.  Ex
			 ,    ":".

:so[urce]! {}	  Vim   {}. 
			Vim     ԣ
			   .
			      |:global|,
			|:argdo|, |:windo|, |:bufdo|,     
			  -  ,  
			       .
			{Vi    }

							      *:ru* *:runtime*
:ru[ntime][!] {} ..
			  Ex   {}  
			  ,    
			'runtimepath'.     , 
			    . : >
			
				:runtime syntax/c.vim
		    
<			     {},
			  .    
			    ,     
			  'runtimepath'.    
			      ( 
			     ).

			    [!],   
			 .  [!]  ,  
			   .

			   {}   ,
			     . : >

				:runtime! plugin/*.vim

<			   Vim    
			 .   >

				:runtime plugin/*.vim
				
<			    .

			   'verbose'    1, 
			      .
			   'verbose'    2, 
			     .
			{Vi    }

:scripte[ncoding] []		   *:scripte* *:scriptencoding* *E167*
			  ,   .
			     
			[]  ,    
			'encoding',  ,     .
			: >
			
				scriptencoding iso-8859-5
				scriptencoding cp932
<
			 []  ,   
			.      ,
			   ,  
			 : >

				scriptencoding euc-jp
				... ,   ...
				scriptencoding
				... ,    ...

<			     
			,       
			  . 

			   "ucs-2"  "ucs-4" 
			 .      
			 ,       
			   NUL.

			 ,  Vim   
			|+multi_byte|.
			{Vi    }

						       *:scrip* *:scriptnames*
:scrip[tnames]		      , 
			      .  
			 ,    
			  |<SID>|.
			{Vi    }
			{    ,  Vim 
			  |+eval|}

						      *:fini* *:finish* *E168*
:fini[sh]		  .    
			    Vim.  
			  .   
			    
			 |:try|  |:finally|,   
			  , ݣ 
			":finally"   |:endtry|.  
			   ":try"  .   ,
			   ģ  
			  ":endtry".
			{Vi    }


       ݣ  
   .       
:

-     "q".     
       .   
    ,  .    ,  
         "p", 
   ,         
  .    ԣ    
   (        
  ).

-          .


     ""  ,
   ":map".

  ,         
    ":source!".     
  .     
 ":map"      - .

 ":source"    Ex  ,   .
 ģ     ,  
.  ":source!"      ,
    ģ   .

ģ .    ":!ls"    
 <Enter> (. |-enter|).       
 "!ls",      Vim   
<Enter>  .    ,      
 ":source!",      "!ls",   
 ,      <CR>. ,   ģ
 <CR>  ,   ":!ls"     
 .

    ":source[!]"   ,  
   .  ":source"    
,        
 ( 15).  ":source!"     15 .

  , ,     , 
   "<sfile>" ( ,  
 ).          
 . ,      "other.vimrc"   
,   ".vimrc",       ".vimrc" 
 : >

	:source <sfile>:h/other.vimrc

   -     
 - .     
    .    , 0x80 
128,     "~@".    , 
    |_|.       
 CTRL-V,    ң   .
,       ,     
 <t_xx>.

							  *:source_crnl* *W15*
MS-DOS, Win32 and OS/2: ,     ":source",
      <CR><NL>.    
   .     ,   
  <NL>, ,    ӣ  Unix-,
         , 
  'fileformats'   ,    
  <CR>. , ,    ,  
    -  ":map <F1> :help^M",  "^M"  
<CR>.   ,      <CR>,  
 ,     ,  <CR>   
 .

Macintosh: ,     ":source",   
    <CR>.      
   .     ,   
  <NL>, ,    ӣ  Unix-,
         , 
  'fileformats'   ,    
  <CR>.  ,     
   <NL>,       <CR>.

   Vim ,  ,   
":source",  ,    <NL>.   
       .   
,      <CR><NL>, ,  
       MS-DOS,     
   <CR>,       
 , , .   
  <EOL>     ,   
  ,  ,    <CR> -
        
.

				      *line-continuation* *_*
    ,   Ex,    
      "\" (  ),
   ݣ    .   
   ,  .

,  >

	:set comments=sr:/*,mb:*,el:*/,
		     \://,
		     \b:#,
		     \:%,
		     \n:>,
		     \fb:-

 ,       : >

	:set comments=sr:/*,mb:*,el:*/,://,b:#,:%,n:>,fb:-

         . 
  ,  ,      
        ;    
      .

  ":append"  ":insert"   : >

   :1append
   \asdf
   .

         
,       : >

   :1appendasdf
   .

  ,    'C'    'cpoptions': >

   :set cpo+=C
   :1append
   \asdf
   .
   :set cpo-=C

 ,      ,  
   'C'   : >

   :set cpo+=C
   :function Foo()
   :1append
   \asdf
   .
   :endfunction
   :set cpo-=C

:

	        
	     . ,  Vim  
	     Vi.  , , 
	 Vi: >
	
		:map xx  asdf\
		
<	         
	 .

==============================================================================
5.  		           *debug-scripts* *_*

  ,      
,    ,  , Vim  
.         
    ,     
.

:    ̣   .  
     .    
 . ,       
 .
{Vi    }

    ,    
 'verbose'.  ,     ,  
 Vim    .


  		          *debug-mode* *_*

          
:

1.  Vim   |-D|: >

	vim -D file.txt

<   Σ       vimrc.  
    ,   ,     Vim.
      ,     Vim  
       ,    
    . 
    ,     (Windows, Macintosh),
         .  
      ,    vimrc  :gui.

								      *:debug*
2.      - ":debug". 
            .
        -   
          , 
     . : >

	:debug edit test.txt.gz

3.         
    .       : >

	vim -c "breakadd file */explorer.vim" .

<    Vim Σ       
   "explorer.vim".         .

         
    .    
,    ,    .  
   ,    "|",   
  .


 

       Ex. , 
  : >

	echo idx

       
"idx".        
"g:": >

	echo g:idx

        .  
   ,    
'verbose',   ,      ,
 ,     : >

	:set verbose=20

  ,   ,    
    ,      ۣ. , >

	:help

    ӣ.

       .

         .
   ,   ,    
    ,       
  , ,   "99j" ( 99   
).

 ,    :
							               *>cont*
	cont		     .
							               *>quit*
	quit		  .   
			 ,   CTRL-C. ,   
			      .
			     
			.
							               *>next*
	next		        ţ
			.      
			   .
							               *>step*
	step		        ţ
			.    
			     .
							          *>interrupt*
	interrupt	    ,   CTRL-C,  
			  ">quit"     
			  .    
			    , 
			 |:finally|  |:catch|.
							             *>finish*
	finish		    
			      
			      
			 .

    :

-     .

-      : "c", "n", "s" and "f".

-  <CR>     . 
   -     , 
   ,       .

-      Ex    ,   
  : ":cont", ":next", ":finish" (   ).


  
							  *:breaka* *:breakadd*
:breaka[dd] func [_] {}
		    . : >

			:breakadd func Explore
<		
		    ,   
		    ݣ   .

:breaka[dd] file [_] {}
		     . : >

			:breakadd file 43 .vimrc

 [_]    ,     
     .     ,
   1.

 {}  ,     
.     ,    .
     (      "^" 
 "$").  "*"   
.  'ignorecase'  ,     
 "\c"  ,     (. |/\c|).
 ()      !

        
  . : >

	breakadd file explorer

    ,      . >

	breakadd file *explorer.vim

   ".../plugin/explorer.vim" 
".../plugin/iexplorer.vim". >

	breakadd file */explorer.vim

    ".../plugin/explorer.vim".

          , 
     ":function".     
   "<SNR>99_".


   			  *:breakd* *:breakdel* *E161*

:breakd[el] {}
		     {}.  
		     
		|:breaklist|.

:breakd[el] func [_] {}
		    .

:breakd[el] file [_] {}
		     .

 [_]  ,       
 .
 {}     ,  
  ":breakadd". ,  "explorer", "*explorer.vim" 
"*explorer*"  .


   
							*:breakl* *:breaklist*
:breakl[ist]
		    .


- 

						      *:debugg* *:debuggreedy*
:debugg[reedy]
		      
		       
		.      
		.  (   ): >

		  echo 'q^Mq' | vim -e -s -c debuggreedy -c 
		  'breakadd file script.vim' -S script.vim

:0debugg[reedy]
		   ":debuggreedy":  
		   ,   
		    .

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