Files
ve/README.md

53 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2025-10-07 19:32:45 +11:00
# ve editor
ve is a vi(m) like editor which runs inside your terminal, using ncurses. At present, it is quite simple, with the following features:
* Create and open text files for editing
* Navigate through files with arrow keys (in normal and insert mode) as well as with hjkl (j and k are swapped because I wanted to)
* Enter insert mode with 'i', go back to normal mode with ESC, and enter commands with ':'
* Insert mode works in the way you'd expect
* Scroll through large files
* Saving and quitting in the same way as Vim
2025-10-08 11:04:27 +11:00
* Delimiter/action-based undo
* Line number counter
2025-10-07 19:32:45 +11:00
## Building
```bash
g++ src/main.cpp -Lncurses -o ve
```
2025-10-08 11:04:27 +11:00
## Keybinds
2025-10-07 19:32:45 +11:00
2025-10-08 11:04:27 +11:00
### Normal Mode
**Moving around:** Use `h` to go left, `j` to go up, `k` to go down, and `l` top go right (or arrow keys if you're boring).
**Enter Insert mode:** Use `i` to enter insert mode
**Enter Command mode:** Use `:` to enter command mode
**Undo/Redo:** Press `u` to undo a mistake, and `r` to redo.
### Insert Mode
**Typing:** Type things in just like in any other editor.
**Moving around:** Use the arrow keys
**Enter Normal mode:** Press `ESC`.
### Command Mode
2025-10-08 11:05:11 +11:00
There are currently four commands for command mode:
2025-10-08 11:04:27 +11:00
`q`: Quits the editor, unless you have unsaved changes.
`q!`: Force quits the editor.
`w`: Saves changes to the file. If a filename is specified, changes are saved to that file.
`wq`: Saves changes to the file, and quits the editor. If a filename is specified, changes are saved to that file.
Press enter to submit your command.