Earlier quoted context omitted.
Long return statements and everything crammed into one line is horrible coding approach. It makes it a pain to debug. Don't do it.
Example?
Build Your Own Text Editor
21–30 of 164 posts
Re: Build Your Own Text Editor
#22I've been messing around with a little text editor component myself in golang:
https://github.com/briansteffens/tui/blob/master/editbox.go
For a SQL editor project:
Re: Build Your Own Text Editor
#23https://github.com/DigitalMars/me
and translated to D:
Re: Build Your Own Text Editor
#24https://github.com/antirez/kilo/blob/master/kilo.c
I wonder how mouse clicking and scrolling in editor works? Would love to make html/js/css for terminal node module. I think that would be fun.
Re: Build Your Own Text Editor
#25Re: Build Your Own Text Editor
#26Reference implementations of medium sized applications are incredibly useful for leveling up as a programmer. While there are many large successful open source applications, many are overwhelming to read and learn from. Having something that outlines the key features and components and which ignores the important but complicated edge cases assists in keeping the attention focused. Now if there are annotation within t…
Do you have anything similar that you would recommend?
Re: Build Your Own Text Editor
#27Nice guide, especially the terminal raw mode stuff. I haven't seen much on that before, I really appreciate that this guide goes over that. I've been messing around with a little text editor component myself in golang: https://github.com/briansteffens/tui/blob/master/editbox.go For a SQL editor project: https://github.com/briansteffens/prequel
Re: Build Your Own Text Editor
#28Re: Build Your Own Text Editor
#29Would something like this be a way for a beginner to C (barely any experience) to get their feet wet? Or is there an expectation of basic familiarity with C already?
Re: Build Your Own Text Editor
#30Scite is a barebone open source text editor created by Neil Hodgson to exercise his "Scintilla" text-editor c++ library which is used in others like notepad++. In hindsight, I would have a bit more caution programming text editors. I started tweaking and modifying Scite years ago, it was very interesting but it was no small undertaking and I came to understand why Neil advised in the support forum, to customise it us…
... it sounds like you kind of wanted emacs. One of the most impressive things I find about emacs (especially since semi-proper packages became a thing) is just how easy it is to get stuff that is 5-10-15 years old working on it. No word of a lie, it's amazing how they've managed to break so little over the years.