Welcome!
Press F4 to view topic,
Ctrl+W to close help file,
Ctlr+Q to quit editor.

Description {
   `cwrite' is a new text editor for the console.
   Provides processing of C/C++ source and preprocessor blocks.
   Allows compact view of source and header files.
   User-friendly interface.
   }
Licence {
   This file is part of cwrite.
   Copyright 2007, Desislav Georgiev.
 
   cwrite is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
 
   Cwrite is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
   along with cwrite.  If not, see <http://www.gnu.org/licenses/>.
   }
Special Features {
  The most remarkable feature of `cwrite' is the processing of source and 
preprocessor blocks.

void example_of_source_block_type_1() 
   { int x, y, i = 30;

     if ( x == y )
        { printf("Source Block 1 type\n");
          leave_message();
          while (i)
             { leave_message();
               i--;
             }
        }
   }
void example_of_source_block_type_2() {
   int x, y, i;

     if ( x == y ) {
        printf("Source Block 2 type\n");
        leave_message();
        while (i) {
          leave_message();
          i--;
        }
     }
}   

# define TEST
# ifdef TEST
   # define ALPHA
# endif
# if 1
   print_message();
# endif

Press F4 when cursor is in the header of the block to collapse/expand block.
Please read the Functional Description, View section to learn more about the
way `cwrite' processes blocks.

The special features of block manipulation provide compact view and easy way
to write and organize source code.
CWrite includes a special header file, "std.h", defining:
  # define HEADER 1
  # define CONST  1
  # define GLOBAL 1
  # define PROTO  1
  # define TEST   1

So, a standard C/C++ source file may look like:

# include "std.h"
# if HEADER
   # include "stdlib.h"
   # include "stdio.h"
   # include "curses.h"
   ...
# endif
# if CONST
   # define A_MAX 20
   # define B_MIN 30
   ...
# endif
# if GLOBAL
   char * _s, * _p;
   int x, y;
# endif
# if PROTO
   void leave_message();
   int print(char * message);
   int print_raw(char *)
# endif

subroutine_1 {
}
subroutine_2
   {
   }
...
subroutine_N
  {
  }

}

Status Line Description {
   * View/Type mode
      Files are opened in protected, or view mode. Press F10 to switch to
   * Ins/Ovr mode
      Insert/Ovewrite mode.
   * Asterisk sign
      Indicates that current file has been modified.
   * Sharp sign
      Indicates a detached block.
   * Scroll
      Indicates scroll mode.
   * Message
      Displays messages.
   * Time
      Displays current time.
  }
Functional Description {
     Entering/Leaving Command Line {
        Press Ctrl+Space to enter command line.
        All commands are typed with small letters.
        Pressing Ctrl+Space cancels any command anytime.
       }
     Command Line Behaviour {
        When the user has choice, up/down arrows or Ctrl+P/Ctrl+N
        navigate possibilities.
       }
     File {
         * New
            New file.
            Command: new
         * Open
             Opens file.
             Command: open
             Fast key: Ctrl+O
        * Save
             Save file.
             Command: save
             Fast key: Ctrl+S
        * Close
             Close file.
             Command: close
             Fast key: Ctrl+W
        * Exit
             Exit `cwrite'.
             Command: exit
             Fast key: Ctrl+Q
      }
     Search {
        * Locate 
           Locate text in file, case sensitive.
           Command: locate
           Fast key: Ctrl+L
        * Find
           Find word in file, case sensitive.
           Command: find
           Fast key: Ctrl+F
        * Replace
           Find word in file, and replace it.

           Command: replace
           Fast key: Ctrl+R
      }
     View {
        * View Collapse
           Collapse all subroutines 1 level. Gives a compact view of the
           source and allows easy manipulation with Selection Move
           functions.
           Fast key: Ctrl+P
        * View Expand
           Expand all subroutines to maximum, source is visible.
           Fast key: Ctrl+N
        * Block Collapse
           Collapse block one level.
           Fast key: Ctrl+C
           Use F4 to collapse/expand block one level
       * Block Expand
           Expand block one level.
           Fast key: Ctrl+E
           Use F4 to collapse/expand block one level.
        * Block Detach
           Detach block. All operations take place in detached block.
           A sharp sign in status line indicates detached state.
           Helps the developer to concentrate on a single subroutine
             (or a block of it).
           Fast key: Ctrl+D
        * Block Attach
           Attach block back to file.
           Fast key: Ctrl+A
        * Block Collapse Max
           Collapse all subblocks of current block.
           Use F3 to collapse/expand block to maximum.
        * Block Expand Max
           Expand all subblocks of current block.
           Use F3 to collapse/expand block to maximum.
       }
     Selection {
        * Mark
           Use F1 to enter selection mode, then arrow keys to select text.
           When selection is done, press Enter.
        * View
           Use F2 to view selection (buffer).
           Selection can be saved as regular file, default filename is
           "selection" in $HOME/.cwrite
        * Cut
           Cut selected text.
           Fast key: Ctrl+X
        * Copy
           Copy selected text.
           Fast key: Ctrl+C
        * Move Left/Right
           Move selected text left/right.
           If a block is selected, the whole block is moved left/right.
           Fast key: left/right arrow
        * Move Up/Down
           Move selected text up/down.
           This function can swap collapsed blocks and is useful for
           organizing source code.
           Fast key: up/down arrow.
      }
     Preferences {
        Set user preferences.
        Command: set
      }
     Bookmarks {
        * Add
           Add bookmark.
           Fast key: Alt+B
        * View
           Go to selected bookmark.
           Fast key: Alt+1, ..., Alt+9
        * Clear
           Clear bookmarks.
           Fast key: Alt+C
      }
     Help {
        Displays this help file.
        Command: help
      }
  }
History Complete
   { `cwrite' supports history of recent entries in csh style.
     History is supported for:
        - command:   contains recent entries of commands
        - file open: contains recent entries of opened files
        - search:    contains recent entries of find, locate and replace
        - goto:      contains recent enties of line numbers
     History navigation: up/down arrow key, or Ctrl+P/Ctrl+N
     When typing in command line, entry can be completed with history
     navigation keys, if available in history.
     Example: File Open
       Typing "s" and pressing Ctrl+P, completes to "scroll.cpp", if
       this file has been recently opened.
   }
Entry Complete
   { `cwrite' supports entry complete (autocomplete) in bash style.
      Press Ctrl+I to invoke directory tree.
      Tree navigation: up/down arrow key, or Ctrl+P/Ctrl+N
      Example: File Open
         Typing "s" and pressing Ctrl+I completes the name of the first
         file in working directory.
   }
        
Fast Keys {
   Control keys {
     * Ctrl+Space
        Enters command line. When in command line mode cancels operation.
     * Ctrl+A
        Attaches a detached block/subroutine.
     * Ctrl+B
        Color browser.
     * Ctrl+C
        Collapse block/subroutine one level.
     * Ctrl+D
        Detaches block/subroutine.
     * Ctrl+E
        Expands block/subroutine one level.
     * Ctrl+F
        Locates text, case sensitive, matching whole words.
     * Ctrl+G
        Go to line number.
     * Ctrl+I
        Insert tab.
     * Ctrl+J
        Inserts a new line down.
     * Ctrl+K
        Delete line content, remove empty line.
     * Ctrl+L
        Locates text (small and capital letters), without matching words.
     * Ctrl+M
        Inserts a new line down.
     * Ctrl+N
        Expands all blocks to maximum, and thus, makes all text visible.
     * Ctrl+O
        Opens file.
     * Ctrl+P
        Collapse all subroutines in file (1 level).
     * Ctrl+Q
        Exits `cwrite'.
     * Ctrl+R
        Replace text.
     * Ctrl+S
        Save file.
     * Ctrl+T
        Continue last search, or replace.
     * Ctrl+U
        Delete text from cursor to end of line.
     * Ctrl+V
        Paste selection.
     * Ctrl+W
        Close current file.
     * Ctrl+X
        Show text coordinates.
     * Ctrl+Y
        Display date.
     * Ctrl+Z
   }
   Functional keys {
     * F1
       Select text.
     * F2
       View selection (buffer).
     * F3
       Block collapse/expand to maximum.
     * F4
       Block collapse/expand one level.
     * F5
       Toggle Scroll state.
     * F9
       Toggle View/Type mode.
     * F10
       Toggle Ins/Ovr mode.
     * F11
       Switch to previous active file.
     * F12
       Switch to next active file.
       }
  }

Author {
   Desislav Georgiev Georgiev <cwrite@mail.ru>
   Home Page: http://cwrite-editor.hoter.ru

   Comments, suggestions and bugs are welcome.
}
