Commit 511a4b40 authored by Ticki's avatar Ticki

Expand help.txt

parent e852cef4
- [ ] Add `B` command
- [ ] Fix `d<motion>`
- [ ] Complete guide
- [ ] Add command prompt
- [ ] Add configuration options
- [ ] Add 't' command
......@@ -66,8 +66,8 @@ impl Editor {
Char('j') => self.goto_down(n),
Char('k') => self.goto_up(n),
Char('l') => self.goto_right(n),
Char('J') => self.goto_down(15),
Char('K') => self.goto_up(15),
Char('J') => self.goto_down(15 * n),
Char('K') => self.goto_up(15 * n),
Char('x') => self.delete(),
Char('X') => {
self.goto_previous();
......
Sodium: A modern editor for the Redox OS
========================================
by Ticki et al.
Sodium is a editor inspired by a various
console based, keyboard-centric editor.
......@@ -48,25 +49,104 @@ change modes.
The following commands are valid in
normal mode:
- h
- j
- k
- l
- J
- K
- H
- L
- g
- G
- b
- B
- i
- r
- R
- x
- X
- d
- o
-
NOTE: <numeral> means repeat command
<numeral> times, unless otherwise
stated.
Basic motion:
- <numeral>h : Go right
- <numeral>j : Go down
- <numeral>k : Go up
- <numeral>l : Go left
- <numeral>J : Go 15 down
- <numeral>K : Go 15 up
- <numeral>H : Go to the start of
the line
- <numeral>L : Go to the end of the
line
Navigation:
- <numeral>g : Go to <numeral> line
- g<motion> : Do <motion>
- G : Go to the end of the document
Cursor management:
- b : Branch the cursor
- B : Delete the current cursor
Editing:
- i : Go to insert mode
- r<char> : Replace the current char
with <char>
- R : Go to replace mode
- x : Delete char
- X : Backspace char
- d<motion> : Delete a given selection
(given by <motion>)
- o : Insert a new line
- ; : Go to prompt mode
# Insert
Insert text before the cursor.
# Replace
Replace the text under the cursor.
# Prompt
Prompt mode is a mode where you can
invoke commands like in Vi(m). In this
mode you can for example set/unset options.
Following commands are valid:
- set <option> : Set <option>
- unset <option> : Unset <option>
- toggle <option> : Toggle <option>
Following option exists:
- highlight or hl : Highlight the text
(useful for coding)
default: on
- autoindent or ai : Automatically indent
newlines.
default: on
To leave prompt press enter and the command
will be invoked. To leave the prompt without
invoking the command use the usual
shift-space command.
Namespaces
----------
A namespace is a set of commands which is
not dependent to any mode.
# <motion>
<numeral> means repeat unless otherwise
stated.
- <numeral>h : Go right
- <numeral>j : Go down
- <numeral>k : Go up
- <numeral>l : Go left
- <numeral>J : Go 15 down
- <numeral>K : Go 15 up
- <numeral>H : Go to the start of
the line
- <numeral>L : Go to the end of the
line
- <numeral>g : Go to <numeral> line
- G : Go to the end of the document
Tips'n'tricks
-------------
- gg : Go to the start of the document
- dL : Delete the rest of the line
TODO: Extend
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment