Skip to content

tbrand/editor-like-tui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

editor-like-tui

This repository is totally for my practice. It doesn't help anything for most people. But if you try to build your editor by yourself in Rust, it could help a bit.

asciicast

How to use

Just execute as same as Rust project. After cloning this repository, type the command below.

cargo run

The tui has emasc-like key binds, but not compatible. Here is the list.

  • Ctrl-b move left
  • Ctrl-f move right
  • Ctrl-p move up
  • Ctrl-n move down
  • Ctrl-a move front
  • Ctrl-e move end
  • Ctrl-j new line (enter)
  • Ctrl-h backspace
  • Ctrl-d delete
  • Ctrl-k kill
  • Ctrl-y paste
  • Ctrl-x toggle "x mode" on

In "x mode", you can

  • [ move top
  • ] move bottom
  • 2 split frame horizontally
  • 3 split frame vertically
  • o move cursor to the next frame
  • b create new buffer
  • 0 remove frame
  • Ctrl-c close app

There is no function that save the text into files now.

Development

An interesting part of this project is that this repository doesn't contains any unit tests at all for now. Instead, it has a monkey test that executes every commands randomly. You can try it by the command below.

cargo test monkey_test::run

About

Build emacs-like tui in Rust just for fun.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages