Built to run on linux with no dependencies. Seems to die on mac, unfortunate.
Like vim I guess. Command line text editor.
- create file
- edit and save file
- Vim commands (d, A, i, w, q, hjkl, gg, dd, G, o, $, probably a few more I forgot)
- see
editor_actions.c
- see
- Line macro and macro recording
:norm
repeat typed commands on visual selection row by rowq
record commands as they are typed, and play back
- Preserve indent
- probably dies on some edge cases
- Enter visual mode (single line) by pressing
v
, or multi-line by pressingV
. - Search for a character inline by pressing
f
(forwards) orF
(backwards), then the character to search for.NORMAL
mode only. - Search for words across lines by pressing
/
(forwards) or?
(backwards), then the text to search for followed byENTER
.NORMAL
mode only.
Requirements: gcc 9.3, valgrind, POSIX OS
make
ormake all
: Builds the editor, in./bin/main
make test
: Run test casesmake valgrind_test
: Run test cases, with valgrind- Note: The editor uses design patterns that result in "still reachable" memory, that is OK
sudo make install
: Copy binary to/usr/local/bin
- lol it works on my machine
tests
: test files/testplaneditor
: editor specific stuffstructures
: generic data structures (kinda? buffer is in here for now, might move it)bin
: binaries (test, main) go here
- weekX-dev: Used to view diffs between week 1/2/3 and main.
- main: up-to-date, working code. Merge requests to main should be viewed for grading purposes.
- jcp-dev: Jing's weekly development branch
- daniel-week-X: Daniel's weekly development branch.
- more unit test
- non ascii char (multi space char, <1 space char)
- Move options to config file (ex. line number, tab width, expandtab should be not be configured via code)