r/cprogramming • • Dec 12 '25
Does anyone use their own text editor that they wrote themself?
Not a C question, per se, but I am writing a text editor in C right now, and looking around for ideas, it seems like this is a pretty common intermediate project. So, if people are writing these to learn C, or any other language, I suppose, do they actually use them for serious work? I was just wondering. I know text editors are a controversial subject, but I thought it might be interesting to ask.
97
Upvotes
122
u/[deleted] Dec 12 '25
Rob Pike famously uses his own text editor that still doesn't have syntax highlighting and he said it's because syntax highlighting is for children. Personally I think he just doesn't know how to implement it.
7
u/SnooDucks2481 Dec 12 '25
I once have this idea of building an IDE using the framework that I build with webkit2gtk.https://www.reddit.com/r/cprogramming/comments/1phuwqh/working_on_a_framework_using_webkitgtk_and_the_c/
But, seems like, nobody cares.
3
u/phdye Dec 13 '25
"The Craft of Text Editing" by Craig Finseth (1991) -- an excellent book on this topic
2
u/kieranvs Dec 13 '25
I do! It’s not an intermediate project, it’s way harder than I thought it would be. I thought it’d take me about 6 months, as a side project. I’ve now been working on it for over 3 years! It took about 1.5 years to get to the point where I was using it as my daily driver. It takes more effort than you think to get the niceties of a modern editor done/integrated, like Copilot, LSP, treesitter, and things that are quite low level and hard to get right like (cross platform) file system watching, unicode etc.
2
u/NeighborhoodNarrow18 Dec 13 '25
Yes!
I started my own text editor project initially in 2023
The idea was a simple GUI C editor to just open, edit and save files (something like notepad, more limited then that even)
Long story short, it quickly became my main editor, to the point I even use it for all my projects!
Added project handling, tab splitting, and syntax highlighting, along with intellisense
Just decided to put it up on Gumroad to see if it raised any interest, let's cross our fingers haha!
What I would say is, start small, don't put yourself the challenge to make the next VIM or anything like that, start with simple text buffer editing in the console and expand it if needed!
12
u/therealhdan Dec 12 '25
Back in the 90's, I worked with a guy who used an editor he had written himself. "The Rocket" he called it because he thought it was faster than whatever other editor people were using around the office. I didn't trust it enough to use it for work, but I was kind of an arrogant kid back then. :)
I think I was using Microsoft's "m", back when it was a programmer's editor, not an IDE.
6
u/scallywag_software Dec 12 '25
Allen Webster and Casey Muratori used an editor publicly called 4Coder for a number of years, which Allen wrote. Seems like it's been sunsetted, but I wouldn't be surprised if they still use it
https://github.com/4coder-archive/4coder
5
u/Willsxyz Dec 12 '25
Ken Thompson used his self-written text editor, ed, for decades.
4
u/flatfinger Dec 12 '25
Back in the MS-DOS era, I used to use a text-file viewer I wrote myself. It was limited to files that could fit in memory, but it could scroll 120 lines/second (two lines/frame) without flicker or snow even on a CGA card.
4
u/FLMKane Dec 12 '25
RMS uses Emacs. That counts.
3
u/yojimbo_beta Dec 12 '25
Kind of. I have a "text editor" at https://www.breck-mckye.com/dead-simple-text/ which is really just a big
textareaand a small amount of JS. But it persists my notes and it reminds me of writing in DOS Edit / Q-Basic2
u/chriswaco Dec 12 '25
No. BBEdit is much better than anything I would write for myself.
2
u/NimrodvanHall Dec 13 '25
I believe one Bram Molenaar used to use his own text editor.
1
u/mlugo02 Dec 12 '25
I’ve thought about making my own text editor but I think I’d just end up making a worse version of vim. But still sounds like fun
1
u/GoblinsGym Dec 12 '25
I used a tiny but quite capable editor (including simple macros) written in 16 bit x86 assembly for decades. The com file was 6K and change. Now I use a more Windows friendly replacement written in Delphi, about 10x the size (and fewer features).
1
u/nacnud_uk Dec 12 '25
In 1991, yes. It handled 4gb files.
1
u/Immediate_Form7831 Dec 12 '25
Not myself, but a friend of mine wrote a text editor many years ago and used it quite extensively.
1
u/Ok-Breakfast-4604 Dec 12 '25
I've thought about writing a cli text editor, but when I get working thats not something that even comes to mind
1
u/zesterer Dec 12 '25
A few months ago my text editor finally gained enough features that I'm now using it as a daily driver (i.e: my day job). It's not written in C, though. My requirements are fairly minimal though: multi-buffer support, a decent file switcher, find/replace, and syntax highlighting. Anything else is just a happy accident in my view.
1
u/ukaeh Dec 12 '25
I wrote a skinable text editor back in the 90s, I used to use it more back when Linux vs Windows new line characters were more of a problem for other editors. Was a great learning experience though!
1
u/Akari202 Dec 13 '25
One of my fist cs class projects was a very simple text file viewer that I got carried away with and made into a full editor. Haven’t really thought about it since I submitted tbh but it was a good project
1
u/alex_sakuta Dec 13 '25
I haven't made a text editor for myself but if you don't use what you make then there's virtually no point in making that thing.
You'll not come back to it and see its weaknesses and have the need to improve it.
So, if you build something, always use it.
1
u/Ok-Breakfast-4604 Dec 13 '25
Only because I saw this post as a fun exercise so I made a basic text editor for the terminal. 😁
embedText
1
u/stianhoiland Dec 13 '25
One of these days I’ll finally get around to making my unique and wonderful CLI text editor that I’m yearning for.
1
u/Secure-Photograph870 Dec 13 '25
I vary between using Neo Vim, VSCode, and my own text editor written in C++ and Qt6. I haven’t worked on my editor in a minute, but I’m planning on jumping back on it. The goal of my editor, like yours, is to learn about modern C++ (C++23 at least) and learn how to build a text editor. Also, this project was first initiated for a group of students I was helping learn software engineering last year when I was pursuing my undergraduate in CS. I personally took inspiration from Neo vim and sublime text. Maybe you could look into that too.
1
u/Geilomat-3000 Dec 13 '25
The developer of Babi uses it
1
u/mjmvideos Dec 13 '25
Back before WordPerfect and Word, I wrote a word processor. But as far as text editors go, once I found the visual interface to ed I have used that and then Vim when it came out. I have never found writing my own to be necessary. Vim is nearly perfect.
1
u/Ramenous Dec 14 '25
I started to write a text editor but I lost all my source code due to a bug in my text editor.
1
u/stlcdr Dec 14 '25
Always eat your own dog food.
1
u/fuzzmonkey35 Dec 16 '25
Bisqwit did it and talks about it on his youtube channel. C++ though not C
1
u/jwlewis777 Dec 16 '25
OMG, that is hilarious!!
I literally gave up with VSCODE and RIDER and said screw it and made my own editor.
Downside of linux, no good code editors, hell, can't even find a good text editor.
1
u/drew_magoo Dec 16 '25
Linus Torvalds is the maintainer, and possibly only user, of MicroEMACS.
https://github.com/torvalds/uemacs
1
u/linux_transgirl Dec 20 '25
One of these days I want to make a guile scheme emacs with the backend seperated from the gui so I can finally have a native feeling emacs on any desktop I use
1
u/h3llll Dec 30 '25
nvi is obviously superior to any other editor and everyone should be using it no matter what
1
u/QuillPensForever Jan 09 '26
Ah yes... You write your C using C made with C
1
u/eddavis2 Jan 09 '26
Yes. I wrote QEdit back in 1984/85 (DOS and OS/2). In 1990 I wrote TSE (DOS, Windows, Linux). I've been using first QEdit and now TSE to do all my coding ever since.
1
u/TheReservedList Dec 12 '25
No. I use a text editor that hundreds of people have been working on for decades.
1
u/saintpetejackboy Dec 13 '25
I would never even try. Making a proper editor or IDE is "I rolled my own OS" level of narcissism.
-1
u/Vaxtin Dec 12 '25
The answer is no.
Any serious work is such a large project that having something go wrong with some other project you made is silly and ineffective. If I’m writing something for the company and it handles millions of dollars per quarter, no I do not use my own text editor.
My emphasis is on getting the one thing I’m being paid to do work exactly right, no questions asked.