Earlier quoted context omitted.
Yep. TextView is a beast. For multi-megabyte files I always use Sublime.
BBEdit is more Mac-like than Sublime and handles multi-gig files with ease.
Nerdy internals of an Apple text editor
81–90 of 93 posts
Re: Nerdy internals of an Apple text editor
#82Awesome description! Thank you!
Re: Nerdy internals of an Apple text editor
#83Earlier quoted context omitted.
Last time ( https://news.ycombinator.com/item?id=38866170 ) there was a small spike in sales, but no lasting effect. I would not say that developers are the target niche. The best customers are professional writers who use a ton of writing apps for different occasions.
Professional writer who uses different writing apps for different occasions is me exactly. I’m also the (or at least a) guy who messaged you about inline comments. As soon as all the details of that feature are implemented, I’m buying it.
I'll be sure to prioritize this work then. :D
Re: Nerdy internals of an Apple text editor
#84Are the internals of other Mac-native text editors like TextMate similar to this as well?
https://github.com/MarkEdit-app/MarkEdit/wiki/Why-MarkEdit The MarkEdit team uses WebView and have strong opinions about why.
Re: Nerdy internals of an Apple text editor
#85Re: Nerdy internals of an Apple text editor
#86Earlier quoted context omitted.
https://github.com/MarkEdit-app/MarkEdit/wiki/Why-MarkEdit The MarkEdit team uses WebView and have strong opinions about why.
Using CodeMirror in a desktop app seems like an interesting choice. I'd love to hear more about why they took this approach.
The average user does not care.
Re: Nerdy internals of an Apple text editor
#87This is great, I think it supplants https://www.objc.io/issues/5-ios7/getting-to-know-textkit/ as my go to introduction to TextKit.
That’s a new layout engine that currently is the default for text fields and on iOS and MacOS, but likely will be the only option some time in the future.
Re: Nerdy internals of an Apple text editor
#88This is great, I think it supplants https://www.objc.io/issues/5-ios7/getting-to-know-textkit/ as my go to introduction to TextKit.
For iOS 15.0 or later/MacOS Monterey or later, you want to look at TextKit 2. See https://developer.apple.com/documentation/appkit/textkit/usi... That’s a new layout engine that currently is the default for text fields and on iOS and MacOS, but likely will be the only option some time in the future.
I want to migrate Paper to it this or next year.
Re: Nerdy internals of an Apple text editor
#89In the era of DOM documents (see notion, gitbook) I very often resort to attributed strings to do magic stuff with text parsing and manipulation. It’s such an elegant structure and I don’t understand why is so unknown. Incredible article btw
Do you have an example? I’d love to learn more!
With attributes strings it’s trivial, you just need to move attributes accordingly and to normalize stuff at the end.
Re: Nerdy internals of an Apple text editor
#90In the era of DOM documents (see notion, gitbook) I very often resort to attributed strings to do magic stuff with text parsing and manipulation. It’s such an elegant structure and I don’t understand why is so unknown. Incredible article btw