README
This commit is contained in:
parent
53b4c5cbcb
commit
fbd72dcd70
54
it/README.md
54
it/README.md
@ -1,2 +1,54 @@
|
||||
# it
|
||||
ass end of ed
|
||||
|
||||
*UNIX ed for a new age...*
|
||||
|
||||
Just kidding, no need to use this over ed.
|
||||
This is just my take on a line editor, heavily inspired by ed.
|
||||
|
||||
For disambiguation it's suggested that this project be referred to as "ited", pronounced however one likes (suggested: "iht-ehd").
|
||||
|
||||
## Included commands
|
||||
|
||||
### buffer
|
||||
|
||||
This is where code relating to the Buffer class is kept but calling this from within the editor will allow you to view the current buffer's attributes.
|
||||
|
||||
### dot
|
||||
|
||||
Change the current position within the buffer.
|
||||
### exit
|
||||
|
||||
Will exit via sys.exit rather than telling main.py to break out of the main loop. Functionally identical to `Q`.
|
||||
|
||||
### f
|
||||
|
||||
Displays or changes the filename associated with the current buffer.
|
||||
|
||||
### it
|
||||
|
||||
Launches a new instance of `it`.
|
||||
|
||||
It should be noted that quitting a nested instance of `it` through the usual means (`exit`, `q`, or `Q`) will exit all nested instances of `it` as well.
|
||||
To return to a higher instance of `it`, send an EOF character via your terminal. In xterm this is CTRL+d.
|
||||
|
||||
### parse\_command
|
||||
|
||||
Used by `it`'s main Python module but calling this from within the editor will allow you to test the command argument splitting.
|
||||
|
||||
### Q
|
||||
|
||||
Quits.
|
||||
|
||||
### q
|
||||
|
||||
Quits, unless your current buffer is unsaved.
|
||||
|
||||
### saved
|
||||
|
||||
With no arguments given, flips the buffer's "saved" boolean attribute.
|
||||
Otherwise, sets the buffer's "saved" attribute to the first argument or errors if multiple arguments given.
|
||||
|
||||
## Making new commands
|
||||
|
||||
Making new commands is very easy.
|
||||
Read `buffer.py` and `it.py` (<100 LOC total).
|
||||
|
Loading…
Reference in New Issue
Block a user