modulepackage
0.0.0-20210621145941-0f375d1fec4c
Repository: https://github.com/kybin/tor.git
Documentation: pkg.go.dev
# README
tor
Tor is a simple terminal text editor.
It's not stable nor well coded, but usable for me.
Key Binding
Tor has different key binding set from other editors.
Basically you could think Ctrl
is for action, Alt
is for move, Shift
is for selection.
Esc
or Ctrl+K
terminates any special mode and return to normal mode.
How to use
Basic
- New file :
$ tor -new filename.ext
- Save :
Ctrl+S
- Undo :
Ctrl+Z
- Quit :
Ctrl+Q
Move
- Left :
Alt+J
- Right :
Alt+L
- Up :
Alt+I
- Down :
Alt+K
- Prev Word Edge :
Alt+M
- Next Word Edge :
Alt+.
- Goto Line :
Ctrl+G
- New Line :
Ctrl+N
- Indent Line :
Ctrl+O
- Unindent Line :
Ctrl+U
- Page Up :
Alt+W
- Page Down :
Alt+S
- Home :
Alt+Q
- End :
Alt+A
- Bigining Of Contents :
Alt+U
- End Of Contents :
Alt+O
- Prev Head Line :
Alt+9
- Next Head Line :
Alt+0
Select
- Select Line :
Ctrl+L
- Select Mode : Shift+MoveAction
- ex) Select Word :
Shift+Alt+.
- ex) Select Word :
Copy, Paste
- Copy :
Ctrl+C
- Paste :
Ctrl+V
Find, Replace
- Find Mode :
Ctrl+F
- Find Next :
Ctrl+D
- Find Prev :
Ctrl+B
- Replace Mode :
Ctrl+R
- Replace :
Ctrl+J
- Cancel Input Mode :
Ctrl+K
Other
- ...And several other key maps, but they may changed frequently.
Install
Install tor as other go programs.
go get -u github.com/kybin/tor
It is recommended to install goimports if you do programming in go.
- goimports :
go get -u golang.org/x/tools/cmd/goimports
# Functions
No description provided by the author
NewArea creates a new Area.
No description provided by the author
NewHistory create a new History.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Action is a user action.
Area is an area of screen.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
History remembers what actions are done by user.
Line.
NormalMode is a mode for text editing.
No description provided by the author
Selection is selection for text.
Text.
No description provided by the author
Window is a area that follows a cursor.
# Interfaces
Mode interface takes an event from terminal and handle it.