A Chicken scheme based version of ry, a basic modal text editor.
Diip fcba7ca142
Update README.md
1 month ago
support Fix bare `make` run and remove repl and it's been extracted to `cs-repl` 2 years ago
.gitignore Add hacky lisp comment highlighting 2 years ago
LICENSE Add license 2 years ago
Makefile Fix bare `make` run and remove repl and it's been extracted to `cs-repl` 2 years ago
README.md Update README.md 1 month ago
buffer.scm Add ^, w, W, b, B and refactor few methods 2 years ago
commands.scm now allows `o` and end of file 2 years ago
cursor.scm Add ^, w, W, b, B and refactor few methods 2 years ago
display.scm Better movement between window (jumping to parents) 2 years ago
events.scm Add buffer-edit ever trigger, update 'modifed? when lines changed 2 years ago
log.scm Add file saving 2 years ago
minibuffer.scm Basic yanking & pasting. Update README 2 years ago
modes.scm Add `I` normal mode key 2 years ago
ry.meta Add hacky lisp comment highlighting 2 years ago
ry.scm began moving towards regex syntax highlighting 2 years ago
ry.setup Initial commit, prototype with few functions 2 years ago
term.scm more refactoring 2 years ago
util.scm Add ^, w, W, b, B and refactor few methods 2 years ago
windows.scm Update readme with window commands 2 years ago
yanking.scm Add hacky lisp comment highlighting 2 years ago

README.md

ry

A basic modal text editor, written in Chicken Scheme

installing

To build and install ry on your computer simply run chicken-install from the project’s root directory.

developing

$ 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)

features

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 end 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)
  • 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)
  • 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)

other features

  • 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)

screenshot

todo (minimal usability)

  • 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

todo

  • 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

license

See LICENSE file.