*cmdline.txt*    Vim version 6.2.   : 2003 May 16


		        VIM -  

				            *Cmdline-mode* *Command-line-mode*
		                   *Cmdline* *Command-line* *mode-cmdline* *:*
  		   *__* *_*

       Ex (":"),  
 ("/"  "?")  - ("!").

       20 
 |usr_20.txt|.

1.   	|_-|
2.         |_-|
3.   Ex			|_-|
4.     Ex      |_-|
5.   Ex		|_-|
6.                   |_-|

==============================================================================
							     *cmdline-editing*
1.   	     *_-*

      .   
        .
 <Insert>       
.
{Vi:       }

 ,        
    ,      
      ":cnoremap".
,        
tcsh     :      
						     *tcsh-style* *-tcsh*
>
	:cnoremap <C-A> <Home>
	:cnoremap <C-F> <Right>
	:cnoremap <C-B> <Left>
	:cnoremap <Esc>b <S-Left>
	:cnoremap <Esc>f <S-Right>

(  <> |<>|;   ).

		         *cmdline-too-long* *_-_*
     ,    
,      ģ  .  
       ,
       .

						   *cmdline-history* *history*
	       *__* *_-* **
 ,   ,    . 
      
   . -   ,   
  :

-   ':'
-   
-  
-   ,      |input()|.

      .   
      .
 'history'    ,   
  ( : 20).

:

-    ,     Σ
  ,      (  
     ).
-      ,    .
  ,     ,    .
-       ,  ,  
     "*"  "#". ,   
       (  -
    ).
  
{Vi   }
{    ,  Vim   
|+cmdline_hist|}

       ͣ;  .
  |__|.

							            *c_CTRL-V*
CTRL-V		    .  
		 ң ,     
		 .      
		 ,     . 
		,     ,     
		(.  |i_CTRL-V|).
		:   Windows CTRL-V   
		 .      CTRL-Q.
		
							            *c_CTRL-Q*
CTRL-Q		 ,   CTRL-V,       
		,      
		. 

							            *c_<Left>*
<Left>		  

							           *c_<Right>*
<Right>		  
							          *c_<S-Left>*
<S-Left>  <C-Left>					          *c_<C-Left>*
		     
							         *c_<S-Right>*
<S-Right>  <C-Right>					         *c_<C-Right>*
		     
		
CTRL-B  <Home>					 *c_CTRL-B* *c_<Home>*
		     
		
CTRL-E  <End>					  *c_CTRL-E* *c_<End>*
		     

					 *c_<LeftMouse>* *c_<>*
<LeftMouse>
<>	
		       

CTRL-H							   *c_<BS>* *c_CTRL-H*
<BS>		    (. |:fixdel|,  
		<BS>      ,  )

							             *c_<Del>*
<Del>		     (  : 
		 ) (. |:fixdel|,   <Del>  
		   ,  )

							            *c_CTRL-W*
CTRL-W		   

							            *c_CTRL-U*
CTRL-U		       
		.   Vim     
		    .    
		 ,     .vimrc 
		: >

			:cnoremap <C-U> <C-E><C-U>
<
		:     
		    ,    
		  .

							          *c_<Insert>*
<Insert>	     .
		{Vi    }

{1} <BS> {2}				        *c_digraph* *c_*
CTRL-K {1} {2}						    *c_CTRL-K*
		  (. ||).  {1} 
		 ,      
		  <>.
		{Vi    }

CTRL-R {0-9a-z"%#:-=.}					  *c_CTRL-R* *c_<C-R>*
		     .
		  CTRL-R      '"',
		 ,     .

		    ,       
		,        .
		       
		f 'wildchar'. ,     
		     ,   
		  (<Esc>, <CR>, <NL>, <C-C>).   
		,  <BS>  CTRL-W     
		    , ޣ  
		       ,
		, ,   .

		 :
		
			'"'	 ,  ̣ 
				    
			'%'	  
			'#'	  
			'*'	  
			'/'	    
			':'	 ģ  
			'-'	  ( ) 
			'.'	  
			'='	 :    
				 (. ||).

		   .  ||.
		{Vi    }

CTRL-R CTRL-F				     *c_CTRL-R_CTRL-F* *c_<C-R>_<C-F>*
CTRL-R CTRL-P				     *c_CTRL-R_CTRL-P* *c_<C-R>_<C-P>*
CTRL-R CTRL-W				     *c_CTRL-R_CTRL-W* *c_<C-R>_<C-W>*
CTRL-R CTRL-A				     *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*

		 ,      :
		
			CTRL-F	    
			CTRL-P	    ,   
				'path',     |gf|
			CTRL-W	   
			CTRL-A	   ; . ||

		{Vi    }
		
		CTRL-F  CTRL-P: {   ޣ  
		+file_in_path}

					     *c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
					     *c_CTRL-R_CTRL-O* *c_<C-R>_<C-O>*
CTRL-R CTRL-R {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A}
CTRL-R CTRL-O {0-9a-z"%#:-=. CTRL-F CTRL-P CTRL-W CTRL-A}
		   ,    
		 .   ,   |c_CTRL-R|,  
		 . ,   a 
		"xy^Hz"	( ^H     ), 
		 "CTRL-R a"    "xz",   "CTRL-R
		CTRL-R a"    "xy^Hz".

							            *c_CTRL-Y*
CTRL-Y		   ,  
		   ; . |_|.
		  ,     
		 CTRL-Y.

CTRL-J						  *c_CTRL-J* *c_<NL>* *c_<CR>*
<CR>  <NL>	   ģ .

							             *c_<Esc>*
<Esc>		   'cpoptions'    'x',    
		      . 
		      'cpoptions'  
		'x',   ģ .

							            *c_CTRL-C*
CTRL-C		       ģ
		.

							              *c_<Up>*
<Up>		  ,    
		ģ   ,   (. ).
		{    ,  Vim  
		 |+cmdline_hist|}

							            *c_<Down>*
<Down>		  ,    
		ģ   ,   (. ).
		{    ,  Vim  
		 |+cmdline_hist|}

						       *c_<S-Up>* *c_<PageUp>*
<S-Up>  <PageUp>
		    
		{    ,  Vim  
		 |+cmdline_hist|}
		
						   *c_<S-Down>* *c_<PageDown>*
<S-Down>  <PageDown>
		    
		{    ,  Vim  
		 |+cmdline_hist|}

CTRL-D		   
		(. |_-|)
		
  'wildchar'
		   
		(. |_-|)

CTRL-N		   
		(. |_-|)
CTRL-P		   
		(. |_-|)
CTRL-A		   
		(. |_-|)
CTRL-L		   
		(. |_-|)

							            *c_CTRL-_*
CTRL-_		a -     "" 
		"",   hkmap.   
		    .    
		  ,       
		 ,   ,    .. 
		    ,  Vim  
		 |+rightleft|   ޣ 
		'allowrevins'.
		. |rileft.txt|.

		b -     "" 
		"",   fkmap.   
		    .    
		   .    
		  ,       
		 ,   ,    .. 
		    ,  Vim  
		 |+farsi|.
		. |farsi.txt|.

							            *c_CTRL-^*
CTRL-^		    |:lmap| /
		   .
		       VAL 
		   'iminsert',   
		'imsearch',    'imsearch'   -1.
		
		 ̣  , 

		-  VAL  1 (ޣ  
		  ), VAL   0 (  
		  ).
		-  VAL   1, VAL   1,   
		    .

		    :

		-  VAL  2 (ޣ   ),
		  VAL   0 (   ).
		-  VAL   2, VAL   2,   
		    .

		      ,
		  ,    . 
		     
		'keymap'.      
		,  ,    
		 .     
		CTRL-^       
		      .
		{Vi    }

      Emacs   
|-emacs|.

 <Up>  <Down>        
   .       
    .    
  ,   ģ .   
        . ,  
       : 
 ":s"     <Up>.        
  <S-Up>   ,   ,   
  . (:     
  <Shift>     ).

							      *his* *:history*
:his[tory]	   ģ .
		{Vi    }
		{    ,  Vim  
		 |+cmdline_hist|}

:his[tory] [{}] [{}][, [{}]]
		    {},   
		   :
		
		c[md]	  :	  
		s[earch]  /	  
		e[xpr]	  =	  
		i[nput]	  @	  
		a[ll]		 
		{Vi    }

		  ,    {} / {},
		     . 
		        :
		
				     *:history-indexing* *:history-*
		       
		,       
		:history.        ,
		 -     .

		      
		     (  , 
		-1),      .
		
		:

		   6  12   : >

			:history / 6,12
<
		      : >

			:history all -5,

==============================================================================
                                                          *cmdline-completion* 
						 *__*
2.              *_-*

      , 
 ,    .  
    :

-  :    .
- :    ":tag".
-  :   ,      
    ,       
  .
- :     ":set".
- :    ":map"   .
-    :    ":if", ":call"  
  .

 Vim    ޣ  |+cmdline_compl|, 
    ͣ ,    .

    :

							            *c_CTRL-D*
CTRL-D		  ͣ,    .
		  ͣ     (.
		   'highlight'). ,   
		 ,    'suffixes',
		   .

			     *c_CTRL-I* *c_wildchar* *c_<Tab>* *c_*
  'wildchar'

		     .
		      .
		(:     ,  
		  'wildchar'    <Tab>
		 <Esc>,      
		).     
		,   .   
		      
		   .
		       
		'wildmode'.

							            *c_CTRL-N*
CTRL-N		     
		'wildchar',    .  
		      .

<S-Tab>							*c_CTRL-P* *c_<S-Tab>*
CTRL-P		   'wildchar',   
		  ,   
		.     
		    . <S-Tab>   
		 ,  Amiga   MS-DOS.

								    *c_CTRL-A*
CTRL-A		  ,    
		.

								    *c_CTRL-L*
CTRL-L		     . 
		  ,     .
		   ,    
		      .
		  ,  ,   
		.

    'wildchar'  <Tab> (CTRL-E  
  Vi;      <Esc>). 
     '*'  '?'. '*'
  , '?'    .

         tcsh,
     : >

	:cnoremap X <C-L><C-D>

( X   ,    , <C-L>  CTRL-L,
 <C-D>  <CTRL-D>).      , 
    .

         tcsh,
  ţ      'wildmode'.
,  autolist=ambiguous  : >

	:set wildmode=longest,list

         
'wildchar',    ģ    
 .

						       *suffixes* **
  ͣ      'suffixes', 
     ,    .
    ,    
  'suffixes', .    
 ".bak,~,.o,.h,.info,.swp,.obj",     
  ,    ".bak", "~", ".o", ".h",
".info", ".swp"  ".obj".     
. :

   :      :				:	~
   test*	test.c test.h test.o		test.c
   test*	test.h test.o			test.h and test.o
   test*	test.i test.h test.c		test.i and test.c

  ,      ,  
  'suffixes',    ,  
     .  
        'wildchar':
   ,   ,    
.        
'wildchar'   CTRL-N  CTRL-P.     ,  
  ,      'suffixes'.

     ̣ , 
 'wildignore'.

         'wildchar'
   '='. ,    'wildchar'  
 ":set dir=",      'dir'.  
   ,    ͣ ,  
 ,      .

     xterm <S-Tab>  CTRL-P,   
   .cshrc  : >

	xmodmap -e "keysym Tab = Tab Find"

   .vimrc  >

	:cmap <Esc>[1~ <C-P>

==============================================================================
3.   Ex 		     *cmdline-lines* *_-*

 Ex   :

						           *:quote* *:*
'"'     Vim   . '"'  
     .  
   . : >

	:set ai		"  'autoindent'
	
        
":!cmd"      ":map",  
  '"'    .

						    *:bar* *:\bar*
'|'     ,    
    .     
'|'    ,      
  '\'.

    '|'   ,   
      :

    :argdo
    :autocmd
    :bufdo
    :command
    :cscope
    :debug
    :folddoopen
    :folddoclosed
    :global
    :help
    :helpfind
    :make
    :normal
    :perl
    :perldo
    :promptfind
    :promptrepl
    :pyfile
    :python
    :registers
    :read !
    :scscope
    :tcl
    :tcldo
    :tclfile
    :vglobal
    :windo
    :write !
    :[]!
    ̣     "-bar", . |:command|.

 ,    , 
 Vi:   ":g"  '|'   ,    ":s" --
.

      ,  
 ":execute".    ģ ,  
   "ls"       : >

	:execute 'r !ls' | '[

  :    'cpoptions'   'b',  
  ":map"  ":abbr",    ,  '\'
  CTRL-V.  ,    "<Bar>". 
.  |map-_|.

: >

	:!ls | wc		   
	:r !ls | wc		     
					
	:%g/foo/p|>		     
					  
	:%s/foo/bar/|>		     
	:map q 10^V|		 "q"  "10|"
	:map q 10\| map \ l	 "q"  "10\"  "\"  "l"
					(  'cpoptions'   'b')

        <NL>. 
     CTRL-V CTRL-J.  
   "^@".   '|'  
 ,      <NL> 
  ,  '|'    .
     <NL>,   
  . : >

	:r !date<NL>-join

       ,  ţ  
.

 ,       '|'  
 ,      .


   Vi    : >

	:|			   ( ":p")
	:3|			  3 ( ":3p")
	:3			   3

      ,  
(      Vi). : >

	:1,$:s/pat/string

   '%'  '#'   ,    
,         (.  
 , |:_%| |:_#|).

 Amiga      ,   , 
       .    
,          
 CTRL-V.  ,   ":next"   
 ͣ .        ,
   . : >

	:next foo\ bar goes\ to school\
	
     ң : "foo bar", "goes to"
 "school ".

        '"'  '|', 
  '%'  '#'   ,    
    .   
         ":substitute".

									 *:_!*
   '!'   Ex   .
 '!'   ݣ   ,   
'!'  .   '!'   ,  '!' 
    ,     .
: 

	:w! name	     "name",  
			  ,   
	:w !name	     
			  "name"

==============================================================================
                                                    *cmdline-ranges* *[range]* 
					             *E16* *E493* *[]*
4.     Ex                *_-*

  Ex      . 
     [].     
   , ̣ ','  ';'.

       |10.3| 
.

						                     *:,* *:;*
       ';',  
     ,   
  .   ,    
  ','. : >

   4,/ /
<	  4    " "  , 
	  . >
   5;/ /
<	  5    " "   5.	    

        ,  
 ,    ":write"  ":global"  
    (1,$).

    ,     , 
       .

                                                    *:range* *E14* *{address}*
     :	         *:* *{}*

	{}		  
	.		 			                  *:.*
	$		   		          *:$*
	%		 1,$ ( )		          *:%*
	't		  t (  )		  *:'*
	'T		  T (  );  
			   ,     
			  
	/{}[/]	    {} 	  *:/*
	?{}[?]	    {}	  *:?*
	\/		    
			  
	\?		    
			  
	\&		     
			

        '+'  '-'  ,
       .   
,      1.

 "/"  "?"  {}      
  .

  "/"  "?"     ,    
   .      
";"   ,       . : >

	/1//2/    ,  "2" 
			     "1"   
	7;/2/	     ,  "2"   7,
			        7.

 {}      0     . 
  0,        1.
,      ޣ,  
  0 (|:tag|, |:pop|,  ..).   
 0  "   " (|:read|,    ..).

: >

	.+3		    
	//+1		,    ,  
			,     ""
	.,$		     
	0;/		 ,     "", 
			   
	1;/		    1,   
			 ""

      -ޣ. 
ޣ    ,    ,
  , ̣   (  -- 
). ,    ޣ   , 
 ,        
(     ).

: >
	:s/x/X/g 5	 'x'  'X'    ң 
			
	:23d 4		  23, 24, 25  26


  

 ޣ      , 
   . . |-|.


 

           
 .    ,  Vim    
,    ģ,    
  ":g".


ޣ  						          *N:*

     ":",   

		:.,.+( - 1)
		
 ,  "" ,    . ,
  ң     >

		3:d<CR>		 ,   .,.+2d<CR>
<

    					         *v_:*

{}:	      
		  .    
		  ":'<,'>",     
		     .

==============================================================================
5.   Ex     *cmdline-special* *_-*

  Ex         , 
  .        
expand(), . |expand()|.

	%	   			 *:_%*
	#	   		         *:_#*
	#n	( n  )      
		 .   "#0"   ,   "#".
	##	      , 	*:_##*
		̣ .     
		    .

 ,       ,   
.       (   
 ),     ":p".
. |_-|.
  ,        
  ,       .
,        .  
        : >

	:!ls "%"
	:r !spell "%"

       '%'  '#', 
     . ,  
        
  ,       .

	    	 ~
	   #			.
	   \#			#
	   \\#			\#

			            *:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
			             *:<sfile>* *<sfile>* *:<afile>* *<afile>*
			             *:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
			             *E495* *E496* *E497* *E498* *E499* *E500*
				     
:    ;   
 !

	<cword>          ( |ף|)
	<cWORD>         (. ||)
	<cfile>     ԣ      (
		   ,   |gf|)
	<afile>          
		     
	<abuf>          
		     (  ":r "   ,
		        ).
	<amatch>       , 
		      .   
		   <afile>    ,    
		      (  FileType  Syntax).
	<sfile>       ":source"   
		    ; 
		        "function
		   {-}";
		        :
		   "function {--1}..{--2}".
		    ,     
		     ,  <sfile>   .

			         *filename-modifiers* *_-*
		 *:_%:* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
        "%",
"#", "#n", "<cfile>", "<sfile>", "<afile>"  "<abuf>".  ,  
   |fnamemodify()|.      
,  Vim    |+modify_fname|.

     :

	:p	    .     
		.    "~/" ( "~user/"  Unix  VMS)
		     .   
		,       
		.           
		 ,   .
	:8	     ͣ 8.3 (  
		  win32).      
		  ,  .
	:~	       
		.    ,     
		   .
	:.	       
		,   .     ,
		        .
		     ":~:.".
	:h	   (   
		).      
		  :e, :r  :t.    
		      .  
		    , 
		    .  ,
		":p:h"         
		 (   ).
		       (..
		  "/"  Unix, "x:\"  MS-DOS, WIN32, OS/2 
		"drive:"  Amiga),      . 
		   (,   
		 ),     .
	:t	   (   ). 
		    ":r"  ":e".
	:r	   (  ).   
		    (   
		 '.',  ".vimrc"),     .
		   ң   
		,       
		.
	:e	  .    
		   ,    
		.    , 
		   .   
		     . 
		  (    ),  
		    .
	:s?pat?sub?
		  "sub"     
		"pat".     |:s|. 
		"pat"   .  '?'  
		  ,     "pat" 
		"sub".
		      
		  . , ":p"  
		       .
	:gs?pat?sub?
		    "pat"   "sub". 
		    ":s".

   ,    "src/version.c",   
"/home/mool/vim": >

  :p			/home/mool/vim/src/version.c
  :p:.				       src/version.c
  :p:~				 ~/vim/src/version.c
  :h				       src
  :p:h			/home/mool/vim/src
  :p:h:h		/home/mool/vim
  :t					   version.c
  :p:t					   version.c
  :r				       src/version
  :p:r			/home/mool/vim/src/version
  :t:r					   version
  :e						   c
  :s?version?main?		       src/main.c
  :s?version?main?:p	/home/mool/vim/src/main.c
  :p:gs?/?\\?		\home\mool\vim\src\version.c

    "src/version.c.gz": >

  :p			/home/mool/vim/src/version.c.gz
  :e						     gz
  :e:e						   c.gz
  :e:e:e					   c.gz
  :e:e:r					   c
  :r				       src/version.c
  :r:e						   c
  :r:r				       src/version
  :r:r:r			       src/version
<
		         *extension-removal* *__* *:_%<*
  (.. ,       
'.',   )        "<"
   "%", "#", "#n"  "CTRL-V p".  
      3.0,  
  ":r". : >

	%		  
	%<		    
	#		     
	#<		 ,   
	#31		   31
	#31<		 ,   
	<cword>		   
	<cWORD>		    (. ||)
	<cfile>		    
	<cfile><	 ,   

:    ,    , 
   .  Unix    , 
        (
 ).    ,   
 >

	:n `echo *.c`

(       |_|).

       ,  
    '%', '#'  ..   
     .    
  <cfile>,      . ,
 ,     "?readme?": 

			    ~
	:e #		:e ?readme?
	:e `ls #`	:e {,  "?readme?"}
	:e #.*		:e {,  "?readme?.*"}
	:cd <cfile>	:cd {    }
	:cd <cfile>*	:cd {       
			    "*",   }

    "!"     
(":!cmd", ":r !cmd"  ":w !cmd"),      
,         . 
  'shell'  "sh",     , 
  "!" .

			       *filename-backslash* *_-_*
  ,        
  (MS-DOS, Windows, OS/2)   
   ,    
     .  , 
   , :     
   ,       .
, "\file\foo"    ,    
     .

       '$'.  
      . ,  
        .
,    "$home"   ,   "/\$home".
 :

	 		~
	$home		    $home
	\$home		 "$home"   
	/\$home		 "$home"   
	\\$home		,    "\\",  
			    $home

==============================================================================
6.        *cmdline-window* *cmdwin* *_-*

          
  .       ,   
  .
{    ,  Vim   
|+cmdline_hist|  |+vertsplit|}


 

      :

1.       ,    
   'cedit'.     CTRL-F,   'compatible'
   .
2.       "q:", "q/"  "q?". *q:* *q/* *q?*
          Ex ("q:") 
     ("q/"  "q?").  ,   
     ޣ   ( "q"  ).

       .  
   ģ     .   
 ,    , .
|_-|.

   Vim    ,  ,  
 'insertmode'.

      'cmdwinheight' (   
 ,      ).   
        
 .




      Σ    
    ,    ,    
.

        , 
 ,   ":", "/"  ,    
  .        
.
							                 *E11*
      .  
         
  .       ,
      .  ,
  , ģ      __.


 							        *E199*

      :

<CR>		     .   
		  ,     .
CTRL-C		     .  
		        
		 .      ,   
		 .  ,   
		":close".      ,  
		     .
:quit		        .
		      ":exit", ":xit" 
		CTRL-\ CTRL-N.
:qall		   Vim,  ,    
		   Σ .
:qall!		   Vim   Σ  
		 .

          
.        , 
       .  , ӣ
 ,       ,   
 . 
,      , . 
,     ,  , 
   <CR>.


 

      :

-   ,        ( 
  );
-         inputsecret();
-  Vim     ޣ  +vertsplit.

       
 :

'filetype'	"vim"     Ex;  
		   ,  
		
'rightleft'	
'modifiable'	
'buftype'	"nofile"
'swapfile'	

      .  ,
         
 .

   'wildchar'   <Tab>   
     Ex,     
        <Tab>: >

	:imap <buffer> <Tab> <C-X><C-V>
	:nmap <buffer> <Tab> a<C-X><C-V>

 ,   <Tab>      
   .      
.      ,     
: >

	au CmdwinEnter [:>] iunmap <Tab>
	au CmdwinEnter [:>] nunmap <Tab>

       vimrc.

           
          .
           
  ,    .  ,   
     ,    .




   : |CmdwinEnter|  |CmdwinLeave|. 
       ,   WinEnter,
WinLeave, BufEnter  BufLeave  .   
        Cmdwin. 
    .
: >

	:au CmdwinEnter :  let b:cpt_save = &cpt | set cpt=v
	:au CmdwinLeave :  let &cpt = b:cpt_save

     'complete'   
      CTRL-N.

 : >

	:au CmdwinEnter [/?]  startinsert

   Vim        
 .

			                   *cmdwin-char* *_-*
,    ,     :

	:	  Ex
	>	   |_|
	/	    
	?	    
	=	  "= |-|
	@	  |input()|
	-	  |:insert|  |:append|

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