CodeQuill User Guide
Sonoran Software Guild

Introduction

CodeQuill is a text editor which features a Java implementation, vi keyboard personality and syntax expansion. As a Java based editor, CodeQuill offers the advantage of working on multiple platforms without requiring multiple copies. In its initial release, CodeQuill emulates the vi keyboard. Users of vi will find the CodeQuill keyboard a familiar tool. CodeQuill also offers user definable syntax expansion. This feature saves keystokes by expanding keywords into nested constructs. CodeQuill is designed to be a direct, efficient, coding tool.

Main Features

  • vi keyboard personality.
  • User definable syntax expansion.
  • Definable tabs stops.
  • Selectable fonts.
  • End of Line space stripping.
  • Tab compression/ space expansion.
  • Auto-indentation.
  • Regular expression command line support.
  • vi buffer copy to clipboard.
  • Yank to vi search buffer.
  • Command line with rotating buffer.
  • File recall list.
  • Case independent search option.
  • Requirements

    Java 1.1 environment.

    Installation

    Refer to the distribution readme.1st file for information on installation and included scripts.

    Deinstallation

    Refer to the distribution readme.1st file for information on deinstallation and included scripts.

    Running

    CodeQuill can be run from the command line or the desktop.

    When CodeQuill is launched with a file argument, either by command line or by dropping a file on the CodeQuill icon, the file is brought up in a vi edit session.

    When CodeQuill is launched without a file argument, a vi edit session must be started either by the CodeQuill command line or the pulldown menus. An edit session can be started from the command line by using the command "new" or "e" . An edit session can be started using the pulldown menu File/New or File/Open.

    Keyboard

    The initial release of CodeQuill supports only a vi keyboard personality. Future releases may include other personalities as demand requires.

    Vi Keyboard Emulation

    CodeQuill is not a exact duplicate of the vi keyboard. The main differences are in the operation of the cursor. A majority of the vi command mode functions have been implemented.

    In CodeQuill the cursor has freer movement it would than in vi. The cursor is not bound to the end of line. While in command mode the cursor may be moved past the end of line. This can be done with the cursor keys or tab keys. Since CodeQuill lines do not wrap, moving the cursor past the end of the window will cause horizontal or vertical scrolling.

    To provide even greater cursor movement freedom an option has been added for end of line independent operation. Selecting this option will allow the cursors up and down movement to be independent of end of line. That means that moving the cursor up or down will not change the cursor column even if this results in the cursor being past the end of line.

    The vi keyboard command mode provides a very powerful environment. The following commands are supported:

    ^B
    Scroll backwards one window.
    ^D
    Scroll forward half a window.
    ^E
    Scroll forward one line.
    ^F
    Scroll forward one window.
    ^G
    Display file information.
    ^H
    Move one space to the left.
    ^J
    Move cursor down one line in the same column.
    ^U
    Scroll up a half window.
    ^Y
    Scroll backward one line.
    SPACE
    Move right one line.
    $
    Move to the end of the line.
    %
    Move to the matching curly brace or parenthesis.
    ^
    Move to the first non-white character on the line.
    +
    Move to the first non-white character on the next line.
    .
    Repeat last command.
    /
    Enter search line.
    0
    Moves to first column of current line.
    :
    Enter command line, forward search.
    <
    Left shift.
    >
    Right shift.
    ?
    Enter command line, backward search.
    A
    Appends on the end of line.
    B
    Backs up a word.
    C
    Change the rest of the line.
    D
    Delete the rest of the line
    E
    Move end of the next word treating punctuation as normal characters.
    G
    Go to line number.
    H
    Moves cursor to top of window.
    I
    Insert at the first non-white space on the line.
    J
    Join the current line with the next line.
    L
    Moves cursor to the last line of the window.
    M
    Moves cursor to the middle line of the window.
    N
    Search in the reverse direction of the last search.
    O
    Inserts a new line above the current line.
    P
    Inserts deleted or addressed text above the current line.
    Q
    Quits current file.
    R
    Replace characters until end of line.
    U
    Restore current line to start state.
    W
    Moves forward one line treating puctunctuation as normal characterss.
    X
    Deletes character preceeding cursor.
    Y
    Yanks line.
    a
    Enter input mode and append text to column following the cursor.
    b
    Move back to beginning of word.
    c
    Change area.
    d
    Delete area.
    e
    Move to the next end of word.
    f
    Scan forward for character.
    h
    Move to left.
    i
    Enter insert mode, entering text into current column.
    j
    Move cursor down one line in the same column.
    k
    Move cursor up one line.
    m
    mark line.
    n
    Repeat last search.
    o
    Append new line to the current line position.
    p
    Put text after column of line.
    r
    Replace character.
    t
    Search the line for a character.
    u
    Undo the last change.
    w
    Move to the beginning of the next word.
    x
    Delete a single character.
    y
    Yank text to buffer.
    z
    Move current line to window position specified by the following characters:
    ENTER or +: First line of window
    .: Center of window
    -: Last line of window

    Command Line

    The CodeQuill command line is basically a vi type command line with the addition of rotating buffers. There are two buffers, one for commands and the other for search. The different buffers are accessed depending how the command line is entered. Typing "/" or "?" in input mode enters the command line for search operations. Typing ":" while in input mode enters the command line for command operations. While on the command line the up and down arrow keys will allow navigation of command line history.

    The greatest difference from vi operation is the absence of the command line escape functions. During testing of the Java environment, a number of issues arose when spawning system commands from Java applications. To avoid complications this functionality was removed.

    Vi command lines can be typed whole or in part.

    d or delete will cause a line to be deleted. In case of duplication more characters may have to be typed. following command line commands are supported:

    copy
    Copy lines.
    delete
    Delete lines.
    edit
    Edit file.
    global
    Process global command.
    join
    Join
    <
    Left shift.
    move
    Move lines.
    mark
    Mark line.
    new
    Start new file session.
    put
    Put lines.
    quit
    Quit file session.
    q!
    Forced quit.
    read
    Read file.
    &
    Resubstitute.
    >
    Right shift.
    substitute
    Substitute.
    undo
    Undo.
    write
    Write File.
    w!
    Forced write.
    wq
    Write quit.
    wq!
    Forced write quit file session.
    yank
    Yank lines.

    Function Keys

    The inital release of CodeQuill supports four function keys:
    F1
    Displays function key help in the information area.
    F2
    Changes current edit to the next file.
    F3
    Changes current edit to the previous file.
    F4
    Displays file information in the information area.

    File Menu

    The File pulldown menu supports basic file handling:
    New
    Selecting New starts a new edit session.
    Open
    Selecting Open launches a file open dialog.
    Recall
    Selecting Recall displays a list of the most recently opened filed. Selecting a file from the list opens the file, if it is not open, or brings causes it to be displayed if it is not the current file.
    Save
    Selecting Save launches a file save dialog.
    Save as
    Selecting Save as launches a File save as dialog.
    Close
    Selecting Close closes the current file. If the file is modified, a dialog will be launched to warn the user that changes will be lost.
    Tab compression
    The Tab compression check item allows the selection of tab compression or space expansion for file writes. This is useful to force tabs or spaces for particular files, such as GNU makefiles.

    The check state of this menu item reflects how the file will be written out. This item will be disabled if Options/File save format/Use existing format is not selected.

    Quit
    Selecting Quit causes the CodeQuill editor to close. If there are open modified files, an exit dialog will be launched which will allow files to be saved or discarded.

    Edit Menu

    The Edit menu supports basic clipboard editing and search:
    Undo
    Undo supports an undo/redo toggle that works the same as the vi command mode undo. This will be changed in future releases to a multiple level undo/redo.
    Copy
    Selecting Copy initiates the copy of mouse marked text areas to the clipboard.
    Copy buffer
    Selecting Copy buffer copies the main vi buffer to the clipboard. This allows lines copied to the vi buffer during keyboard operations to be copied to the clipboard.
    Cut
    Selecting Cut cuts the marked text area from the file and copies it to the clipboard.
    Paste
    Selecting Paste causes clipboard text to be pasted into the current file.

    Options Menu

    Font name
    Font name allows selection of any Java available font.
    Font point size
    Font point allows selection of the font point size.
    Font bold
    Font bold allows selection of the bold font attribute.
    Auto indent
    When Auto indent is checked auto-indentation is enabled. When auto-indentation is enabled and new line is created, cursor will be placed in the same column as the first character of the first previous line containing text.
    Tab column
    Tab column item allows selection of the column interval of tab stops. The tab column selection only effects the tab key operation, it does not effect the output of tabs which are always on eight charcter intervals.
    New file format
    New file format allows selection of the tab compression/space expansion default of new files. The default selection can be overridden by the file save format option.
    File save format
    File save format allows selection of the file save format. If Use existing format is selected then the file will be saved in the format its original format. If Save with spaces is selected, all files will be written out with tabs expanded to spaces. If Save with tabs is selected, spaces will be converted to tabs on eight column boundaries. If a tab was found when the file was read, or if the new file format is a tab default, the file will be written out in tab compressed form.
    Strip EOL spaces
    This menu item selects stripping of end of line spaces. This option is recommended to keep files consistent and at minimum size.
    Search
    Displays a "Match case" checklist item. When selected searches will match case. If not selected seaches will be case insensitive. This option affects only searches started from the search command line or the vi 'n' and 'N' commands.
    Cursor
    The Cursor menu allows selection of end of line independent cursor operation by selecting EOL independent on the sub menu. EOL independent cursor movement will allow the cursor to be moved up and down through the file without tracking end of line.
    Syntax file
    This menu item launches a file dialog which allows selection of a syntax file. A description of syntax file use follows later in this guide.
    Save options
    This menu item causes the current options to be saved. Options are saved in the java user home directory in a file named "cqoptions.ini". If this file does not exist, it will be automatically created when options are saved.

    Help Menu

    Help
    This menu item causes a function key help menu to be displayed.
    About
    This menu item causes CodeQuill product information to be displayed.

    Syntax Expansion

    Syntax expansion is one of the key features of CodeQuill. This feature allows the editor to recognize keywords in the file and expand them into text templates. The keyword templates are located in the syntax file which can selected in the options pulldown menu. This file can be easily modified by the user to accommodate changing needs.

    The template format is as follows:

    .keyword            - keyword.
    line one            - line one of template.
        line two @      - line two of template. "@" marks the cursor location.
    line three          - line three of template.
    .                   - End mark of template (not included).
    
    Another example:
    .main
    #include 
    
    main (int argc, char *argv[])
    {
        printf ("@\\n");
    }
    .
    
    Please note:The character \ is an escape. When \ preceeds a character the character is taken literally. To use @ in a template without it designating cursor placement use \@. In the example above the use of \\ displays as \.

    Typing "main" ENTER will construct program with the cursor positioned at a point to enter, perhaps, "hello world".

    When an enter key is hit while in input mode, the line is checked for a keyword. If the keyword is found, the template is substituted for the keyword. The keyword must be the only word on the line.

    New templates can be added by editing the syntax file which is a simple text file. A sample syntax file, "cqsyntax", is provided with the distribution. This file contains "C" or "Java" templates. By following the example file, any language can be supported.

    In order for CodeQuill to use the syntax file from other directories, the syntax file must be selected by using the Options/Syntax file pulldown and the location must then be saved by selecting the Options/Save options pulldown.

    Work files

    CodeQuill uses two work files, cqoptions.ini and cqobject. These files are created automatically in the Java user home directory. cqoptions.ini is created the first time options are saved. cqobject is created the first time CodeQuill is exited. These files are not necessary for CodeQuill operation. CodeQuill has built in defaults.

    Future development plans

    Future CodeQuill development will be driven by user demand and the functionality of the Java platform. The following list is comprised of items under first consideration for future releases.

    License

    Please refer to the license.txt file included in the distribution.

    Contacting the Author

    Any comments, suggestions or bug reports can be sent to:

    John Simmons (simmons@goodnet.com).

    OR

    Visit the Sonoran Software Guild web site: Sonoran Software Guild.