r/C_Programming • u/Ok-Machine4940 • Jul 09 '26
Project I made a text editor! :D
https://github.com/schnerg/tied
NO AI WAS USED IN THE MAKING OF THIS PROJECT!
Written entirely in c using only the standard library The T.I editor
is a rubbish yet lightweight terminal editor that probably wont crash.
I have been working on this project on and off for about 2 years now.
I have restarted this project 5 or 6 times from 2022 when I first started programing till now
and I think it is finally in a place where it is somewhat usable.
What makes this editor special?
NOTHING! :D
I am in school for music so this is just for fun but what do you think? Is the code garbage?
thanks.
•
u/AutoModerator Jul 09 '26
Hi /u/Ok-Machine4940,
Your submission in r/C_Programming was filtered because it links to a git project.
You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.
While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
32
u/Ok-Machine4940 Jul 10 '26
NO AI WAS USED IN THE MAKING OF THIS PROJECT!
7
u/letmehaveanameyoudum Jul 10 '26
.... im goingg to try use it for osdev for a day and see what happens to me
6
u/skeeto Jul 10 '26 edited Jul 10 '26
Neat project! I strongly recommend using these compiler flags (instead of nothing!):
The first two warnings catch of a bunch of bugs statically. The last catches bugs at run time: lots of buffer overflows, and some VLA misuse. Those VLAs are ticking time bombs, so
-Wvlawill help you find and remove them. Just don't use them. C23 is stricter about prototypes, and using it catches an additional bug statically. Using-funsigned-charwill reveal more bugs at run time related togetch, which assumescharis signed.Your
strncatcalls are all wrong, and the sources of some of your buffer overflows. This function has no legitimate uses. Null terminated strings are causing you lots of trouble — off-by-one overflows inremove_line,syntax_highlighting,get_input,search,get_file_name,load_file, andwrite_line_buffer_to_file— and despite what you were probably taught you'd be better off avoiding null terminated strings whenever possible by instead tracking lengths.5
u/iLaysChipz Jul 10 '26
That's cool, but I was more excited about it when I thought it was a two column editor which would be great for taking notes in classes and such. But having a file explorer built in is also nice
5
u/LEWMIIX Jul 10 '26
cool and all but does it have vim motions kappa
6
u/Safe-Confidence-4907 Jul 11 '26
No ai? That's what we want.
1
u/Last-Employ-3422 Jul 11 '26
Wow very cool, Does it support grapheme? Also what does it use to store text? just a raw `char*`?
1
u/Mega2223 Jul 10 '26
That's awesome, i've been wanting to make one but messing with buffer issues is a little too intimidating to me, by far one of the coolest things i've seen in this sub