A basic modal text editor, written in Chicken Scheme
To build and install ry
on your computer simply run chicken-install
from the
project's root directory.
$ make run 2> error.log # Build ry & runs it, redirecting error/debug to file
$ tail -f error.log # Stream error/debug info to standard out
$ make repl # Run a chicken scheme repl with history (backed by linenoise)
ry
is a text editor aiming to provide an editing environment similar to vim
in terms of key bindings while being as easily extended as emacs
.
It is easy to extend in scheme, and, as emacs, the core being written in the same language, you can change virtually everything in your plugins.
Currently implemented keybindings:
- Normal Mode
- q Quits editor (
save-buffers-kill-ry
) - i Enters insert-mode (
enter-insert-mode
) - a Enters insert-mode moving right before
- A Enters insert-mode moving to the end of the line
- 0 Moves cursor to the beginning of the line (
beginning-of-line
) - $ Moves cursor to the beginning of the line (
end-of-line
) - ^ Move to first non whitespace character of line (
first-non-whitespace
) - w Move to beginning of WORD forward (
next-beginning-of-word
) - W Move to beginning of WORD forward (
next-beginning-of-word
) - b Move to beginning of WORD backwards (
previous-beginning-of-word
) - B Move to beginning of WORD backwards (
previous-beginning-of-word
) - o Insert a new line below current line (
insert-line-up
) - O Insert a new line above current line (
insert-line-down
) - h Moves cursor left (
backward-char
) - j Moves cursor down (
next-line
) - k Moves cursor up (
previous-line
) - l Moves cursor right (
forward-char
) - gg Move to beginning of buffer (
beginning-of-buffer
) - G Move to end of buffer (
end-of-buffer
) - ctrl+u Jump 15 lines up (
previous-line-jump
) - ctrl+d Jump 15 lines down (
next-line-jump
) - yy Yanks current line to . register (
copy-whole-line
) - p Pastes contents of . register (
paste
) - dd Deletes current line (
kill-whole-line
) - dh or dj Deletes char left of cursor (
delete-backward-char
) - dk or dl Deletes char right of cursor (
delete-forward-char
) - : Asks for a command in the minibuffer and eval's it (
smex
) - :qEnter Quits
- :wEnter Saves current buffer
- x Deletes char under cursor (
delete-char-under-cursor
) - Ctrl+x Ctrl+f Open file (
open-file
) - Ctrl+x Ctrl+c Quit (
kill-ry
) - Ctrl+w s Split window horizontally (
split-window-horizontally
) - Ctrl+w v Split window vertically (
split-window-vertically
) - Ctrl+w h Move to left window (
window-move-left
) - Ctrl+w j Move to bottom window (
window-move-bottom
) - Ctrl+w k Move to top window (
window-move-top
) - Ctrl+w l Move to right window (
window-move-right
)
- q Quits editor (
- Insert mode
- any visible chars Inserts character at cursor's position (
self-insert-char
) - backspace Deletes character to the left (
delete-backward-char
) - esc Enters normal mode (
enter-normal-mode
)
- any visible chars Inserts character at cursor's position (
- Command mode (when typing in the minibuffer)
- any visible chars Inserts character at cursor's position (
command-mode-insert-char
) - backspace Deletes character to the left (
command-mode-delete-char
) - enter Commits command (sends command text to handler) (
command-mode-commit
) - esc Enters normal mode (
exit-command-mode
)
- any visible chars Inserts character at cursor's position (
- Windows
- Basic auto-indent
- Basic showing of space characters at eol
- Buffers based editing (you can edit other files without the need to re-open previous)
- Basic yank-kill-paste with 27 registers (. & a-z)
- basic highlighting (only comments and {}""'')
- visual mode
- support movement
- visual line mode
- support d
- support c
- support y
- support ~ (in visual too)
- support gu (in visual too)
- support gU (in visual too)
- support < & > (in visual too)
- b & e & w
- [n]gg
- change directory
- run shell command
- completion in opening file
- highlighting (syntax based)
better key mapping (support for ctrl & meta)- zz
- kill-ring (with named registers)
saving- searching
n N * / #
f{char} & F{char}
- undo/redo
- user config file
- themes
- dired
- completion in command mode
- configuration options
- hooks (enter mode, exit mode, new buffer, read buffer,...) a la aucmd
MIT