I got my little text editor to a first usuable state

1 week ago 11

Hi,

I want to share my latest project which I spent multiple weeks on so far.
It's a simple texteditor for the terminal what might not be so impressive, but i did it without using third party libraries like ncurses (still not super impressive maybe, but i'm a bit proud of it still)

It took me like forever to get the rendering of the lines with line wrapping, cursor movement and scrolling working together.

Features so far:
- load/save files - editing - scrolling with page up/down - select text by press shift while moving the cursor - (very) small menu (opens with esc)

The text is hold in a double-linked list with a gap for editing (would try a different approach the next time I guess), and the visible lines are buffered seperately with information about the width on screen (to be prepared for word sensitive wrapping in some future version). The actual printing to the screen uses something like front and backbuffer to prevent screen flickering.

https://github.com/defname/clieditor

submitted by /u/_defname to r/C_Programming
[link] [comments]
Read Entire Article