                            QE -- PE2 under U*nix
                            ---------------------

1.  About QE

    QE is a PE2 clone editor program under U*nix (PE2 is an editor software under
    PC-DOS), I named it QE for the reason that the P is followed by Q :-)

    QE is a macro-definable full-screen editor software for U*nix, users can
    benefit from this feature...

    The  homepage  of QE:

    http://www.cc.ncu.edu.tw/~center5/product/qe/

    and also the English introdution homepage of QE is on "Linux for Taiwan"

    http://members.xoom.com/linux4tw/qe/

2.  Installation

    The QE source is developed under C++, the source code can be downloaded

    http://www.cc.ncu.edu.tw/~center5/product/qe/

    and please  make  sure you have  following  software  to make executable
    binary:

    g++:       GNU C++ Compiler
               reference version:    gcc-2.8.1.tar.gz
                                     libstdc++-2.8.1.1.tar.gz
    ncurses:   GNU Curses
               reference version:    ncurses-4.2.tar.gz

    Steps:
    untar the file you've downloaded, edit the Makefile  if you want to change the setting,
    then run the following commands:

    make
    make install


3.  Environment setting

    The  default   executable   binary   of  QE  will  be  installed   under
    /usr/local/bin, configuration  (qe.pro) and help  (qe.hlp) files  is under
    /usr/local/etc if you didn't change the default Makefile setting.

    The "qe.pro"  hold the public setting of QE and key definition, also the
    macro.  or you can use private  one under HOME directory  named ".qerc".
    for now, key definition  under  qe is as same as under PE2, press F1 under QE
    will retrieve  the "qe.hlp" file for help.  you can check the PE2 manual
    as well.

    QE support  color display, but the behavior  of some terminal  emulator
    have to be changed to support  color display.  If the console  or
    terminal emulator under Linux/FreeBSD support color display, you have to
    change the TERM to xterm-color or color_xterm  or rxvt (depends on system) as
    following:

    under csh or tcsh:
    setenv TERM xterm-color

    under sh, bash, ksh:

    TERM=xterm-color
    export TERM

    Or, you can use the command line option to change the TERM setting:

    qe -t xterm-color

    but, this will not work in some platform.

    So, to simplify the setting, you can use the shell script as follow (named it pe2
    or whatever you like):
    --------------------------------------
    #!/bin/sh

    t=$TERM
    TERM=xterm-color
    export TERM

    qe "$@"

    TERM=$t
    export TERM
    -------------------------------------


4.  command line options

    -h    Help (available option list)
    -t    Setting Terminal Type
          (e.g  qe -t xterm-color)
    -p    use profile (.pro) instead of ~/.qerc
          (e.g  qe -p ~/myqe.pro)

5.  Bug report

    Please send bug report to center5@cc.ncu.edu.tw

6.  profile file (.pro) and temporary setting (in command line)

    SET commands

      set blankcompress on/off  (compress the blank)

          status query: run the [?b] on command line

      set searchcase exact/any  (ignore the case or not when search or replace)

          status query: run the [?s] on command line

        set searchcase exact    exact the same
        set searchcase any      any

      set big5 on/off/auto      (Chinese mode in Big5)

          status query: run the [?5] on command line

        set big5 on             yes, Chinese mode
        set big5 off            English mode
        set big5 auto           Auto detect  (by LANG environment setting,  zh_TW for Chinese, others for English)

      set history-key none/up/down/both  (the key to choose the histories in command line)
        set history-key none    close
        set history-key up      key UP
        set history-key down    key DOWN
        set history-key both    both key UP and DOWN

      set dir-sort-by name/time/size  (sorting as reading the directory)
        set dir-sort-by name    by filename
        set dir-sort-by time    by the time of files
        set dir-sort-by size    by the size of files


      set ctrl-k on/off
      set ctrl-q on/off
      set ctrl-x on/off

        ] UNIX WiQΪ֫ܦhA] QE \ϥΪ̥H
        Ctrl-K (Ѧ joe  WordStar)  Ctrl-Q (ѦҺ~) 
        Ctrl-X (Ѧ Emacs) ft䥦CftiHO^r
        ƦrAOH k- q- x- ܡCp k-q N Ctrl-K Q
         def k-q = [quit] hiHN QE wqp JOE @몺\A
        n set ctrl-k onA|h ctrl-k 즳\C

        bROndߥثeoǥ\}piOH [?k]B[?q]  [?x]
        dߡA]ib Editing AUקC


    DEF series

        def or d is used for macro command definition on keys, e.g.

        def enter=[il][up][fn][down]

        you can define it on the command line directly, but it won't be kept for next time you
        run qe (so you can keep it on the profile file qe.pro)


7.  commands in command line

    1. open file:    e filename or edit filename

    2. save file:    save  (not support: save filename)

    3. save and quit:   file

    4. quit:         quit or q or [quit]

    5. rename:       n filename or name filename

    6. dir:          dir or dir path
                     use the lightbar to choose the file after the command dir

    7. Shell:        shell to you SHELL, and exit from SHELL to go back to QE

    8. jump to line: run line 110 will jump to LINE 110

    9. temporary macro: @ӨAOOwqb\WA]ibROCUO

   10. {ɩwq:   bROC{ɭקY\䪺wqApN enter 䪺\
                     אּJ@AU@檺}YAiU
                     def enter=[down]
                     t~wq\]iHXөwqA軡A쥻zw
                      Ctrl-Z ӧRAF Ctrl-Z X{
                     key code: [ 26 ] is not definedAhziHU
                     d 26=[dl] ӹFتAoإ\SOAX@ function
                     key: f1 ~ f12, home, end, pgup, pgdn  work ɡC

   11. {ɭק:  set OiקҡApg Makefile @wn
                     set blankcompress on

   12. jM:         l/abc/ B /abc B /abc/  UjM abc rꪺa
                     l/def/- B /def/-        WjM def rꪺa
                     lak/a   B l\k/\         UjM k/ rꪺa
                      ^  ^       ^  ^
                     l/abc/m  B /abc/m       UjMbаOϦ abc rꪺa
                     l/abc/m- B /abc/m-      WjMbаOϦ abc rꪺa

   13. jM/N:    c/abc/def/               UjM abc rאּ def
                     c#ab/#d\b#               UjM ab/ rאּ d\b
                      ^   ^   ^
                     c/abc/def/-              WjM abc rאּ def
                     c/abc/dev/m              UjMаOϦ abc rאּ def
                     c/abc/def/-m             WjMаOϦ abc rאּ def

                     jߨA|X{pUT (oӳM pe2 P)
                     confirm change [y/n/q/a]:
                     Yes    y n changeAMU@
                     No     n AMU@
                     Quit   q A]AF
                     All    a AnAݤF

                     pGQbROCUOӤn@Ӥ@Ӹ߰ݡAhb
                     ̫n[ * Ap:

                     c/abc/def/*


    `N: ثejMOjpO_ϤA searchcase Mw  !!!!


8. supported macro commands

    PE2 compatible macro commands:
    ---------------------------------------------------------------------
    command                  abbreviation    description
    ---------------------------------------------------------------------
    [backtab word]           [bw]            ^WӦr
    [beep]                   [bp]            oX beep n
    [begin line]             [bl]            檺}Y
    [begin mark]             [bm]             mark Ϫ}Y
    [begin word]             [wb]            r}Y
    [bottom]                 [bo]            go bottom of the file
    [bottom edge]            [be]            ṳ̀U@
    [center line]            [cl]            NЩҦbmվb
    [command toggle]         [cg]            ROϩMưϪ
    [copy from command]      [cf]            NROCƫư
    [copy mark]              [cm]            NаOϪƫЩҦbm
    [copy to command]        [ct]            NЩҦbưϪeROC
    [cursor command]         [cc]            ROC
    [cursor data]            [ca]            ư
    [delete char]            [dc]            R@Ӧr
    [delete line]            [dl]            R@
    [delete mark]            [dm]            RаO
    [down]                   [down]          cursor up
    [edit]                   [e]             edit file
    [end line]               [el]            cursor end of line
    [end mark]               [em]            ваOϪ̫
    [end word]               [we]            вr
    [erase begin line]       [eb]            RХH᪺
    [erase end line]         [ee]            RХHe
    [execute]                [ex]            execute command line commands
    [fill mark]              [fm]            NаO϶J@Ӧr
    [first nonblank]         [fn]            ЩҦbĤ@ӫDťժr
    [insert line]            [il]            J@
    [insert mode]            [im]            JҦJҦ
    [insert toggle]          [it]            JҦ
    [join]                   [jo]            join next line to the end of this line
    [left]                   [left]          cursor left
    [lowercase]              [lc]            lowercase the data in the marked block area
    [mark block]             [mb]            mark block
    [mark line]              [ml]            mark lines
    [move mark]              [mm]            move the marked block to cursor position
    [overlay block]          [ob]            νƻ\覡ƻs block ΦаO
    [page down]              [pd]            U@
    [page up]                [pu]            W@
    [pop mark]               [po]            q|XаO
    [push mark]              [ps]            NаOϩi|
    [replace mode]           [rm]            JҦNҦ
    [right]                  [right]         cursor right
    [rubout]                 [ro]            delete the one character on the left of the cursor
    [scrolldown]             [scrolldown]    ùW
    [scrollup]               [scrollup]      ùU
    [scrollleft]             [scrollleft]    ù
    [scrollright]            [scrollright]   ùk
    [shift left]             [sl]            NаOϸƩ@
    [shift right]            [sr]            NаOϸƩk@
    [split]                  [sp]            NЫ᪺ƲU@
    [tab]                    [tb]            UөwI
    [tab word]               [tw]            U@Ӧr
    [top]                    [to]            ɮת}Y
    [top edge]               [te]            ṳ̀W@
    [undo]                   [ud]            ٭~J
    [unmark]                 [um]            аO
    [up]                     [up]            cursor up
    [uppercase]              [uc]            uppercase the data in block
                             [?b]            query the status of blankcompress setting
                             [?s]            query the status of searchcase setting
    [quit]                   [quit]          quit (won't save the file)
    [clear marks]            [ck]            clear the marks
    ---------------------------------------------------------------------

    QE macro commands:
    ---------------------------------------------------------------------
    command                  abbreviation    description
    ---------------------------------------------------------------------
    [kill line]              [kl]            delete the data behind the cursor,
                                             if the cursor is in the end, then join the next line
    [search]                 [search]        QE style data searching
    [menu]                   [menu]          pulldown menu
    [history]                [history]       list the history
    [quit all]               [quit all]      close all files, and quit the QE (won't be ask to save the files)
    [file all]               [file all]      save all files, and quit the QE
                             [?k]            query the status of Ctrl-K
                             [?q]            query the status of Ctrl-Q
                             [?x]            query the status of Ctrl-X
                             [?5]            query the status of Chinese message


8. not supported macro commands (my todo list)

    [backtab]
    [center in margins]
    [clear message]
    [demo end]
    [demo fast]
    [demo slow]
    [escape]
    [left edge]
    [left margin]
    [mark char]
    [next view]
    [next window]
    [paragraph margin]
    [print]
    [print mark]
    [redraw]
    [reflow]
    [right edge]
    [right margin]
    [split screen]
    [zoom window]

Press ESC (or Alt-ESC) key twice to switch between DATA area and COMMAND LINE area,
you can define this function to other keys, the macro command is [cg]

