Code Monkey home page Code Monkey logo

ry-v5's Introduction

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

ry-v5's People

Contributors

kiasaki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.