I’d like to view man pages in Atom. So I have something that inserts the output of “man ls” into a buffer, and it uses some simple visual formatting: x followed by backspace followed by another x means a bold x, and underline followed by backspace followed by x means an underlined x.
(If two characters xy are bold, then that’s done by having x^Hxy^Hy where ^H is my representation of backspace.)
I have no idea how to go about formatting this. I think I can write a grammar that matches this kind of stuff, then assigns a scope, then I can define the right font properties. That’s okay, but I will have to hide every other character (and the backspace, too). And then I don’t think that searching for “ls” will find a bold “ls”…
So I will have to munge the text before inserting into the editor. But after munging, how do I tell Atom to make it bold? (Or underlined, or whatever.)