cmd.hlp

来自「开放源码的编译器open watcom 1.6.0版的源代码」· HLP 代码 · 共 576 行 · 第 1/2 页

HLP
576
字号
	    general regular expressions strings.
	    s1 is the regular expression that opens a match, s2 is 
	    the regular expression that closes a match.
	    Note that in the matching regular expressions, "magic"
	    is automatically set (ie, special characters automatically
	    have their meaning).

	[max]imize
	  - maximizes the current window

	[min]imize
	  - minimizes the current window

(range)	[m]ove (addr)
	  - delete the specified line range and place after line (addr)

	[movew]in
	  - enter window move mode.  The cursor keys may be used to move the
	    current file window.

	[n]ext
	  - move to next file being edited.

	[o]pen <file>
	  - open a new window on specified file.  If no file is specified,
	    then a new window is opened on the current file.  These new
	    windows are different views on the same file.

	[p]rev
	  - move to the previous file being edited.

(addr)	[pu]t (buff)
	  - put the specified buffer (buff) (either numbered or named) after
	    the specified line.

	[q]uit(!)
	  - exit current file.  If it has been modified, ! must be specified.

	[quita]ll
	  - exits the editor if no files have been modified

(line)	[r]ead
	  - read text from file (filename) after line specified by (line).  
	    If (line) is not specified, the current line is assumed.
	    Line 0 may be specified in order to read a file 
	    in before the first line of the file being edited.
	    If (filename) is not specified, then a window containing
	    a list of files in the current directory is opened, from
	    which a file may be selected.

	[res]ize
	  - enter window resize mode.  The cursor keys may be used to resize 
	    the current file window:
			UP - move top border up
		      DOWN - move top border down
		      LEFT - move right border left
		     RIGHT - move right border right
		  SHIFT_UP - move bottom border up
		SHIFT_DOWN - move bottom border down
		SHIFT_LEFT - move left border left
	       SHIFT_RIGHT - move left border right

	[se]t (variable) (value)
	  - certain variables within the editor are modifiable after it is
	    running.  (Value) is assigned to (variable).  See the
	    "settings" help for more information.

	[setcolor] <c> <rgb>  
	  - set color <c> to have the <rgb> value <r>,<g>,<b>
	    e.g. setcolor %(pink) 63 0 38

	[sh]ell
	  - escape to a dos shell.

	[size] x1 y1 x2 y2
	  - resizes current window to have upper left-hand corner at
	    (x1,y1) and lower right-hand corner at (x2,y2)

	[so]urce (script) (p1) (p2) ... (pn)
	  - run source script file (script).  Optional parameters (p1) to
	    (pn) may be specififed, these are passed to the specified source
	    script. if "." is specified as the script name, the current
	    file being edited is run. See "scripts" help for more information.

(range) [s]ubstitute /regexp/repl/(g)(i)
	  - replace each occurance of regular expression regexp with the
	    replacement string repl (in the specifed line range).  Each
	    line is searched only once for regexp; if (g) is specified,
	    all occurances of regexp on a line are matched. If (i) is
	    specified, then each substitution is verified. See
	    "regularexpressions" help for more information on regular
	    expressions.

	[tag] (tagname)
	  - searches for the tag (tagname). uses the file "tags", which
	    has a collection of procedure names and typedefs, along with
	    the file in which they are located and a search command/line
	    number with which to exactly locate the tag.

	[tile] (h)|(v)|(x y)
	  - tile all current file windows.  The tiling layout is specified
	    as an x*y grid. If no parms are given, maxwindowtilex and 
	    maxwindowtiley are used. If (h) is specified, then files are
	    tiled horizontally (as many as will fit).  If (v) is specified,
	    then files are tiled vertically (as many as will fit).  
	    Specifiying (x y) overrides the default tile grid.
	    Specifying tile 1 1 causes all windows to be restored

	[unab]brev (abbrev)
	  - removes the abbreviation (abbrev). See abbrev.

	[unal]ias (alias)
	  - removes definition of the the command line alias (alias).
	    See alias.

	[u]ndo (!)
	  - removes last change, specifying (!) undoes the last undo.

	[unmap](!) (key)
	  - remove the mapping of the key (key) in command mode.
	    If ! is specified, then the key mapping is removed in
	    insert mode. See map.

	[ver]sion
	  - display version of the editor

	[vie]w (!) (filename)
	  - like the edit command, only causes file to be a "view only"
	    file (no modification commands work)

	[vi]sual (filename)
	  - re-enter visual mode (if in EX mode), and, if (filename)
	    is specified, edit it.

(range) [w]rite (!) (filename)
	  - write specified range of lines into a file.  If no line range 
	    is specified, all lines are written.  If (filename) is not
	    specified, the current file name is assumed.  If (filename)
	    exists, ! forces an overwrite.

(range) [y]ank (buffer)
	  - yank (copy) line range.  If a buffer ('1'-'9', or 'a'-'z')
	    is specified, the text is yanked into it, otherwise the 
	    text is yanked into the active buffer.

	[x]it
	  - exit current file, saving it if it has been modified.

Menu Setting Commands
=====================
The editor menus are set dynamically.  Any menu will
automatically be added to the menu bar when created, and removed when
destroyed.  There are some reserved menus:

windowgadget - this menu is the one that appears when the upper left hand
	       corner of a window is clicked.
float<0-3>   - this are floating menus.  They are made to appear via
 	       the script command "floatmenu".

	[addmenui]tem <menuname> <itemname> <cmd>
	    - adds a new item to a previously created menu <menuname>
	      see MENUITEM for details.

	[deletemenu] <menuname>
	    - destroys menu with name <menuname>

	[deletemenui]tem <menuname> <index>
	    - deletes item number <index> from menu <menuname> (0 based).
	      if <index> is -1, then the last item is removed from the
	      menu.

	[endmenu]
	    - terminates the creation of a new menu

	[menu] <menuname>
	    - starts the creation of a new menu <menuname>. If a menu
	      exists with the name already, it is destroyed an re-created.
	      A character preceded with an '&' will be the hot key
	      for activating the menu, eg &Control would have 'C' as
	      the hot key.
	      <menuname> may be a reserved name: windowgadget, float0,
	      float1, float2, or float3

	[menuitem] <itemname> <cmd>
	    - adds an item to the menu started with the MENU command.
	      <itemname> may be a quoted string. A character preceded
	      with an '&' will be the hot key for activating the menu
	      item, eg &Exit would have 'X' as the hot key.
	      cmd may be any editor command

Window Setting Commands
=======================
Each window in the editor can be configured.  The following are used to
specify the active window's properties:

	[border] <hasbord> <fg_clr> <bg_clr>
	  - set whether or not there is a border: <hasbord>=-1: none,
	    <hasbord>=1: has border
	    <fg_clr> - foreground color of border  (ignored for no border)
	    <bg_clr> - background color of border  (ignored for no border)
	     
	[dimension] <x1> <y1> <x2> <y2>
	  - (x1,y1) - coordinates of upper left-hand corner of window
	    (x2,y2) - coordinates of lower right-hand corner of window
	    the editor automatically senses the number of lines and columns 
	    avaliable. window dimensions can be set relative to this.
	    All parameters may be coded as arbitrary expressions. The
	    global variables %(SW) (screen width) and %(SH) (screen height)
	    are useful for coding dimensions that are relative to the
	    current screen size.
	   
	[endw]indow
	  -  cease entry of information for the active window
		 
	[hilight] <fg_clr> <bg_clr>
	  - sets foreground and background color of hilighted text in 
	    the window
	 
	[text] <fg_clr> <bg_clr>
	  - sets foreground and background color of normal text in the window

The active window is set by using one of the following commands.  Once
an active window is set, all border, dimension, hilight and text
commands apply to that window.  Information is processed when
either a new active window is entered, or when the endwindow command is used.

An example of a command sequence for setting a window is:
    editwindow
    border 1 %(light_green) %(blue)
    dimension 0 1 %(SW)-1 %(SH)-5
    text %(bright_white) %(blue)
    hilight %(light_magenta) %(blue)
    endwindow

	[commandw]indow
	  - window where commands and search expressions are entered

	[countw]indow
	  - window that opens when repeat counts are entered (toggled
	    with the "repeatinfo" flag)

	[ctrlw]indow
	  - sets properties of the windows that open up when a topic 
	    is selected from the control bar (menu).

	[ctrlbarw]indow
	  - sets properties of the windows the control bar (menu) window

    	[defaultw]indow
	  - after this is set, all windows get its properties

	[dirw]indow
	  - window that opens up when a file name is not specified 
	    in the "edit" or "read" commands.

	[editw]indow
	  - default text editing window

	[extrainfow]indo
	  - window in which extra information about possible activites 
	    is displayed (displayed with the fgrep and files command)

	[filew]indow
	  - window in which list of files currently being edited is displayed

	[filecw]indow
	  - window in which list of possible file choices when 
	    file completion cannot match one specific file

	[linenumberw]indow
	  - window in which line numbers are displayed

	[messagew]indow
	  - window in which all editor feedback is reported. 
	    (the hilight color is the color errors are reported in)

	[setw]indow
	  - the window in which current editor settings are displayed 
	    (displayed when "set" is entered without parameters)

	[setvalw]indow
	  - window in which the new value of an editor setting is entered 
	    (in conjunction with the setwindow, above)

	[statusw]indow
	  - window where current line and column are reported (toggled with
	    with flag "statusinfo")

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?