3 ms·
Are the internals of other Mac-native text editors like TextMate similar to this as well?
by kccqzy 3y ago
Are the internals of other Mac-native text editors like TextMate similar to this as well?
- pvg 3y agoThat depends on the extent on which they rely on the system-provided frameworks. When the needs of the editor get specialized enough, all sorts of hackery happens.
- ladberg 3y agoA quick glance at https://github.com/textmate/textmate https://github.com/textmate/textmate says they don't but someone correct me if I'm wrong
- Someone 3y agoDepends on what you call “similar”. They’ll have storage, layout, a part of the layout that’s visible, etc, but they may not separate them that clearly, and won’t have that rich an API. TextView is way more flexible than what the typical _text_ editor needs. Text editors typically don’t need multiple fonts, multiple font sizes, varying line spacing, paragraph indents, proportional fonts, right-aligning or decimal tabs, images inside text, etc. All those features make TextView relatively slow and memory hungry. Because of that, I don’t think _text_ editors that handle multi-megabyte files will use a single NSAttributedString to store the entire document’s text.
- papereditor 3y agoYep. TextView is a beast. For multi-megabyte files I always use Sublime.
- kccqzy 3y agoAnd for multi-gigabyte files I use HexFiend.
- KerrAvon 3y agoBBEdit is more Mac-like than Sublime and handles multi-gig files with ease.
- papereditor 3y agoIndeed, there are a handful of those dev-oriented editors that crunch through mega files with ease. No idea why I prefer Sublime. :D
- confd 3y agohttps://github.com/MarkEdit-app/MarkEdit/wiki/Why-MarkEdit https://github.com/MarkEdit-app/MarkEdit/wiki/Why-MarkEdit The MarkEdit team uses WebView and have strong opinions about why.
- Ezhik 3y agoUsing CodeMirror in a desktop app seems like an interesting choice. I'd love to hear more about why they took this approach.
- papereditor 3y agoWeb tech is an obvious pragmatic choice. Cross-platform by default, amazing libraries with great support. The average user does not care.
- sharkjacobs 3y agoA great example of a very different approach to this is Runestone https://github.com/simonbs/Runestone https://github.com/simonbs/Runestone