Crookes

Crookes is a console-mode (aka ASCII-mode) text editor written in Python. It is inspired by an old, old console editor called Wylbur.     If vi makes no sense to you, try Crookes.

Note that the Crookes project is now inactive.

You can find screenshots HERE and a short example of an edit dialog using Crookes (below).

Requires

Downloads

Available HERE.

For contact info, see Steve Ferg's web page.

License

Creative Commons Licence
This work is licensed under the Creative Commons Attribution 2.0 License You are free to copy, distribute, and display the work, and to make derivative works. If you do, you must give the original author credit.

Install Instructions

Crookes comes as a single file: crookes.py
Copy it into your Python site library.
At that point, you have installed Crookes.

Here are a few tips to make using Crookes a bit more convenient.

Create a file to drive crookes.
I like the name cred.py, but you can choose your own name.
In cred.py, put the following lines:

        import crookes
        crookes.main()

If you are running on Linux, you should add your
own shebang line to cred.py, chmod to make it executable, etc.

On Windows, after making cred.py and putting it wherever you like,
I suggest making a batch file called cred.bat with the contents to
run cred.py.  It might look something like this:

        @echo off
        python c:\myfavorites\editors\cred.py %1

For more information on how to use Crookes, run Crookes and
type 'h' or '?' or 'help' at the command prompt.

Here is a short example: using Crookes to create a file.


Opening a new, empty file

--------------------------------------------------------------------------------
To open a file:
  Type in 'open' or 'o' followed by the filename.

Examples:
   open myfile.txt           # opens myfile.txt
   o!                        # opens a new, empty file

For help, enter 'help' or 'about'.    To  exit, enter 'x' or 'q'.
For help with a particular command, enter: help 
--------------------------------------------------------------------------------
>>>>>>>>| o!

Inserting some lines into the file using the 'i' (line insert) command

          --------------------------------------------------------------------------------
          file: !  lines=1  undoBuffer=0  clipboard_lines=1
     Top  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
-----> 1
     End  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
>>>>>>>>| i
insert..| This is a first line of data
insert..| and this is a second line.
insert..|

Copying a block of lines to Crookes internal clipboard using the 'bc' (block copy) command

          --------------------------------------------------------------------------------
          file: !  lines=3  changed=yes  undoBuffer=2  clipboard_lines=1
     Top  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
       1  This is a first line of data
-----> 2  and this is a second line.
       3
     End  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
>>>>>>>>| bc

Copying the block from the clipboard using the 'ba' (block insert after) command

          --------------------------------------------------------------------------------
          file: !  lines=3  changed=yes  undoBuffer=2  clipboard_lines=1
     Top  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
       1  This is a first line of data
-----> 2  and this is a second line.
       3
     End  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********| Block copied to clipboard: 1 lines, from 2 through 2.
>>>>>>>>| ba

Editing a line. Command 'e3' puts us into line-edit mode editing line 3.

          --------------------------------------------------------------------------------
          file: !  lines=4  changed=yes  undoBuffer=3  clipboard_lines=1
     Top  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
       1  This is a first line of data
-----> 2  and this is a second line.
       3  and this is a second line.
       4
     End  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
>>>>>>>>| e3
text....| and this is a second line.
       -->              rrrrrrthird
text....| and this is a third line.
       -->        i (I hope)
text....| and this (I hope) is a third line.
       -->dddd
text....| this (I hope) is a third line.
       -->rT
text....| This (I hope) is a third line.
       -->d
text....| his (I hope) is a third line.
       -->iand t
text....| and this (I hope) is a third line.
       -->

Delete the last line of the file

          --------------------------------------------------------------------------------
          file: !  lines=4  changed=yes  undoBuffer=4  clipboard_lines=1
     Top  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
       1  This is a first line of data
       2  and this is a second line.
-----> 3  and this (I hope) is a third line.
       4
     End  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
>>>>>>>>| d last

Save the new file as demo2.txt

          --------------------------------------------------------------------------------
          file: !  lines=3  changed=yes  undoBuffer=5  clipboard_lines=1
     Top  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
       1  This is a first line of data
       2  and this is a second line.
-----> 3  and this (I hope) is a third line.
     End  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
>>>>>>>>| saveas demo2.txt

Exit the editor

          --------------------------------------------------------------------------------
          file: demo2.txt  lines=3  undoBuffer=0  clipboard_lines=1
     Top  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
       1  This is a first line of data
       2  and this is a second line.
-----> 3  and this (I hope) is a third line.
     End  ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********| File demo2.txt was written to disk.
>>>>>>>>| x
Exiting Crookes editor