Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

lucasmolinari/sage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sage

Rust

Sage is a small console-based text editor inspired by Vim.

Installation and Usage

Clone the repository:

git clone https://github.com/lucasmolinari/sage
cd sage

Build and run the application:

cargo run --release

You can also provide a file to open and edit:

cargo run --release src/main.rs

Movement

Cursor Movement in Normal mode.

Keys Motion
h Move cursor left
j Move cursor down
k Move cursor up
l Move cursor right
w Move forward to the start of a word
e Move forward to the end of a word
b Move backward to the start of a word
ge Move backward to the end of a word
_ Move to the start of the line
$ Move to the end of the line
gg Move to the first line
G Move to the last line

Editing

Enter Insert Mode to directly write to the file, similar to Nano.

Keys Action Mode
x Delete character at cursor position Normal
dd Delete current line Normal
a Append Insert
i Prepend Insert
I Move to start of the line Insert
A Move to end of the line Insert
o Insert new line bellow cursor Insert
O Insert new line above cursor Insert
Esc Leave Insert Mode Insert

Commands

Use Esc to leave command mode and Enter to execute current command.

Command Optional Args Action
:w New file name Write file
:q ! Quit editor - ! to ignore changes
:wq New file name Write file and quit

Based on the following source codes:

About

Terminal Text-Editor based on Vim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages