home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / d / elvis / Docs / ex < prev    next >
Encoding:
Text File  |  1989-12-31  |  8.1 KB  |  267 lines

  1. [line]        append
  2.         args        [files]
  3.         cd        [directory]
  4.         chdir        [directory]
  5. [line][,line]    change
  6. [line][,line]    copy        line
  7. [line][,line]    debug[!]
  8. [line][,line]    delete        ["x]
  9.         edit[!]        [file]
  10.         ex[!]        [file]
  11.         file
  12. [line][,line]    global        /regexp/ command
  13. [line]        insert
  14. [line][,line]    join
  15. [line][,line]    list
  16.         map[!]        key mapped_to
  17. [line]        mark        x
  18.         mkexrc
  19. [line][,line]    move        line
  20.         next[!]        [files]
  21.         Next[!]
  22.         previous[!]
  23. [line][,line]    print
  24. [line]        put        ["x]
  25.         quit[!]
  26. [line]        read        file
  27.         rewind[!]
  28.         set        [options]
  29. [line][,line]    substitute    /regexp/replacement/[p][g]
  30.         tag[!]        tagname
  31.         undo
  32.         unmap[!]    key
  33.         validate[!]
  34.         version
  35. [line][,line]    vglobal        /regexp/ command
  36.         visual
  37.         wq
  38. [line][,line]    write[!]    [[>>]file]
  39.         xit[!]
  40. [line][,line]    yank        ["x]
  41. [line][,line]    !        command
  42. [line][,line]    <
  43. [line][,line]    =
  44. [line][,line]    >
  45.  
  46. TEXT ENTRY
  47.     [line] append
  48.     [line][,line] change ["x]
  49.     [line] insert
  50.  
  51.     The (a)ppend command inserts text after the specified line.
  52.  
  53.     The (i)nsert command inserts text before the specified line.
  54.  
  55.     The (c)hange command copies the range of lines into a cut buffer,
  56.     deletes them, and inserts new text where the old text used to be.
  57.  
  58.     For all of these commands, you indicate the end of the text you're
  59.     inserting by hitting ^D or by entering a line which contains only
  60.     a period.
  61.  
  62. CUT & PASTE
  63.     [line][,line] delete ["x]
  64.     [line][,line] yank ["x]
  65.     [line] put[!] ["x]
  66.     [line][,line] copy line
  67.     [line][,line] move line
  68.  
  69.     The (d)elete command copies the specified range of lines into a
  70.     cut buffer, and then deletes them.
  71.  
  72.     The (y)ank command copies the specified range of lines into a cut
  73.     buffer, but does *not* delete them.
  74.  
  75.     The (pu)t command inserts text from a cut buffer after the specified
  76.     line -- or before it if the ! is present.
  77.  
  78.     The (co)py command yanks the specified range of lines and then
  79.     immediately pastes them after some other line.
  80.  
  81.     The (m)ove command deletes the specified range of lines and then
  82.     immediately pastes them after some other line.  If the destination
  83.     line comes after the deleted text, then it will be adjusted
  84.     automatically to account for the deleted lines.
  85.  
  86. DISPLAYING TEXT
  87.     [line][,line] print
  88.     [line][,line] list
  89.  
  90.     The (p)rint command displays the specified range of lines.
  91.  
  92.     The (l)ist command also displays them, but it is careful to make
  93.     control characters visible.
  94.  
  95. GLOBAL OPERATIONS
  96.     [line][,line] global /regexp/ command
  97.     [line][,line] vglobal /regexp/ command
  98.  
  99.     The (g)lobal command searches through the lines of the specified range
  100.     (or through the whole file if no range is specified) for lines that
  101.     contain a given regular expression.  It then moves the cursor to each
  102.     of these lines and runs some other command on them.
  103.  
  104.     The (v)global command is similar, but it searches for lines that
  105.     *don't* contain the regular expression.
  106.  
  107. LINE EDITING
  108.     [line][,line] join
  109.     [line][,line] !    program
  110.     [line][,line] <
  111.     [line][,line] >
  112.     [line][,line] substitute /regexp/replacement/[p][g]
  113.  
  114.     The (j)oin command catenates all lines in the specified range together
  115.     to form one big line.  If only a single line is specified, then the
  116.     following line is catenated onto it.
  117.  
  118.     The ! command runs an external filter program, and feeds the specified
  119.     range of lines to it's stdin.  The lines are then replaced by the
  120.     output of the filter.  A typical example would be ":'a,'z!sort -n" to
  121.     sort the lines 'a,'z according to their numeric values.
  122.  
  123.     The < and > commands shift the specified range of lines left or right,
  124.     normally by the width of 1 tab character.  The "shiftwidth" option
  125.     determines the shifting amount.
  126.  
  127.     The (s)ubstitute command finds the regular expression in each line,
  128.     and replaces it with the replacement text.  The "p" option causes
  129.     the altered lines to be printed, and the "g" option permits all
  130.     instances of the regular expression to be found & replaced.  (Without
  131.     "g", only the first occurrence is replaced.)
  132.  
  133. UNDO
  134.     undo
  135.  
  136.     The (u)ndo command restores the file to the state it was in before your
  137.     most recent command which changed text.
  138.  
  139. CONFIGURATION & STATUS
  140.     map[!] [key mapped_to]
  141.     unmap[!] key
  142.     set [options]
  143.     mkexrc
  144.     [line] mark x
  145.     visual
  146.     version
  147.     [line][,line] =
  148.     file
  149.  
  150.     The (ma)p command allows you to configure Elvis to recognize your
  151.     function keys, and treat them as though they transmitted some other
  152.     sequence of characters.  Normally this mapping is done only when in
  153.     the visual command mode, but with the [!] present it will map keys
  154.     under all contexts.  When this command is given with no arguments,
  155.     it prints a table showing all mappings currently in effect.  When
  156.     called with two arguments, the first is the sequence that your
  157.     function key really sends, and the second is the sequence that you
  158.     want Elvis to treat it as having sent.
  159.  
  160.     The (unm)ap command removes key definitions that were made via the
  161.     map command.
  162.  
  163.     The (se)t command allows you examine or set various options.  With
  164.     no arguments, it displays the values of options that have been
  165.     changed.  With the single argument "all" it displays the values of
  166.     all options, regardless of whether they've been explicitly set or
  167.     not.  Otherwise, the arguments are treated as options to be set.
  168.  
  169.     The (mk)exrc command saves the current configuration to a file called
  170.     ".exrc" in the current directory.
  171.  
  172.     The mar(k) command defines a named mark to refer to a specific place
  173.     in the file.  This mark may be used later to specify lines for other
  174.     commands.
  175.  
  176.     The (vi)sual command puts the editor into visual mode.  Instead of
  177.     emulating ex, Elvis will start emulating vi.
  178.  
  179.     The (ve)rsion command tells you that what version of Elvis this is.
  180.  
  181.     The = command tells you what line you specified, or, if you specified
  182.     a range of lines, it will tell you both endpoints and the number of
  183.     lines included in the range.
  184.  
  185.     The file command tells you the name of the file, whether it has been
  186.     modified, the number of lines in the file, and the current line number.
  187.  
  188. MULTIPLE FILES
  189.     args [files]
  190.     next[!] [files]
  191.     Next[!]
  192.     previous[!]
  193.     rewind[!]
  194.  
  195.     When you invoke Elvis from your shell's command line, any filenames
  196.     that you give to Elvis as arguments are stored in the args list.  The
  197.     (ar)gs command will display this list, or define a new one.
  198.  
  199.     The (n)ext command switches from the current file to the next one in
  200.     the args list.  You may specify a new args list here, too.
  201.  
  202.     The (N)ext and (pre)vious commands (they're really aliases for the same
  203.     command) switch from the current file to the preceding file in the
  204.     args list.
  205.  
  206.     The (rew)ind command switches from the current file to the first file
  207.     in the args list.
  208.  
  209. SWITCHING FILES
  210.     edit[!] [file]
  211.     tag[!] tagname
  212.  
  213.     The (e)dit command allows to switch from the current file to some other
  214.     file.  This has nothing to do with the args list, by the way.
  215.  
  216.     The (ta)g command looks up a given tagname in a file called "tags".
  217.     This tells it which file the tag is in, and how to find it in that file.
  218.     Elvis then switches to the tag's file and finds the tag.
  219.  
  220. EXITING
  221.     quit[!]
  222.     wq
  223.     xit
  224.  
  225.     The (q)uit command exits from the editor without saving your file.
  226.  
  227.     The (wq) and (x)it commands (really two names for the same command)
  228.     both write the file before exiting.
  229.  
  230. FILE I/O
  231.     [line] read file
  232.     [line][,line] write[!][[>>]file]
  233.  
  234.     The (r)ead command gets text from another file and inserts it after
  235.     the specified line.
  236.  
  237.     The (w)rite command writes the whole file, or just part of it, to
  238.     some other file.  The !, if present, will permit the lines to be
  239.     written even if you've set the readonly option.  If you precede the
  240.     filename by >> then the lies will be appended to the file.
  241.  
  242. DIRECTORY
  243.     cd [directory]
  244.     chdir [directory]
  245.     shell
  246.  
  247.     The (cd) and (chd)ir commands (really two names for one command)
  248.     switch the current working directory.
  249.  
  250.     The (sh)ell command starts an interactive shell.
  251.  
  252. DEBUGGING
  253.     [line][,line] debug[!]
  254.     validate[!]
  255.  
  256.     These commands are only available if you compile Elvis with the
  257.     -DDEBUG flag.
  258.  
  259.     The de(b)ug command lists stats for the blocks which contain the
  260.     specified range of lines.  If the ! is present, then the contents
  261.     of those blocks is displayed, too.
  262.  
  263.     The (va)lidate command checks certain variables for internal
  264.     consistency.  Normally it doesn't output anything unless it detects
  265.     a problem.  With the !, though, it will always produce *some*
  266.     output.
  267.