Skip to content
/ ry Public

A simple modal text editor, written in Go, scriptable in Lua

License

Notifications You must be signed in to change notification settings

kiasaki/ry

Repository files navigation

ry

A simple modal text editor, written in Go

or

This is my editor. There are many like it, but this one is mine.

installing

To build and install ry on your computer simply run go get github.com/kiasaki/ry.

developing

make run # builds and runs ry

features

ry is a text editor aiming to provide an editing environment similar to vim in terms of key bindings and modal editing while being as easily extended as emacs. It's is built with the day-to-day usage of the original author in mind but hopefully flexible enough for anybody with Vim experience to adopt and mold to their image.

Currently implemented keybindings:

  • Normal Mode
    • C-q Quits editor
    • : Enters command mode
    • C-c Cancels keys entered
    • C-g Cancels keys entered
    • ESC ESC Cancels keys entered
    • h Moves cursor left
    • h Moves cursor right
    • j Moves cursor down
    • k Moves cursor up
    • 0 Moves cursor to the beginning of the line
    • $ Moves cursor to the beginning of the line
    • g g Moves to the beginning of the buffer
    • G Moves to the end of the buffer
    • C-u Move 15 lines up
    • C-d Moves 15 lines down
    • z z Centers current line in view
    • w Moves forward to next beginning of a word
    • e Moves forward to next end of a word
    • b Moves backwards to next beginning of a word
    • i Enters insert-mode
    • I Enters insert-mode at beginning of line
    • a Enters insert-mode then moves right 1 character
    • A Enters insert-mode then moves to the end of the line
    • o Enters insert-mode and creates a new line under the current one
    • O Enters insert-mode and creates a new line on top of the current one
    • u Undo last change
    • C-r Redo last change
    • x Delete char under cursor
    • d d Deletes line under cursor
    • y y Copies line under cursor
    • p Pastes from clipboard
    • m $alpha Set mark at cursor
    • ' $alpha Jump to mark
    • v Enter visual mode
    • V Enter visual line mode
    • C-w s Splits buffer horizontally
    • C-w v Splits buffer vertically
    • C-w h Move to the window to the left
    • C-w j Move to the window to the bottom
    • C-w k Move to the window to the top
    • C-w l Move to the window to the right
    • SPC b Runs buffers command
    • SPC f Runs edit command on current file's directory
    • SPC n Runs clearsearch command
  • Insert mode
    • $any Inserts character at cursor's position
    • BAK Deletes character to the left
    • RET Inserts a new line at cursor position
    • ESC Enters normal mode
  • Prompt mode
    • $any Inserts character
    • BAK Deletes character
    • C-c Enters normal mode
    • ESC Enters normal mode
    • RET Execute command and go back to normal mode
    • C-u Clear entered command
  • Visual mode
    • ESC Exit visual mode
    • y Yank selection
    • d Delete selection
    • p Paste selection
  • Buffers mode
    • q Close buffer
    • RET Open selected buffer in current window
  • Directory mode
    • q Close buffer
    • RET Open selected file in current window

Currently implemented commands:

  • edit <filename> (aliased as e) Edit a file in a new buffer (shows file selector on directories)
  • write <filename?> (aliased as w) Write buffer to disk, optionally setting it's path
  • quit (aliased as q) Close current buffer (making sure it's saved before)
  • quit! (aliased as q!) Close current buffer (ignoring unsaved changes)
  • writequit (aliased as wq) Writes buffer to disk then closes it
  • clearsearch (aliased as cs`) Hides search result highlights
  • buffers (aliased as b) Shows a list of buffers in current window

screenshot

license

See LICENSE file.

About

A simple modal text editor, written in Go, scriptable in Lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published