castles_made_of_sand wrote:You could paint contiguous characters, grouped by line, of like highlighting, as one region?
I played with the idea for a while, but decided against it:
1) Its more complicated and I've got enough complexity to deal with already
2) Setting a region for each char is not as slow as you would think. After all how many are there on the screen at once? 1500? 2000? It's usable even if I do a full screen redraw each time a new char comes in. With diff updates it will be even less noticeable.
3) I gain a stable refresh time, colorfulness (or lack of thereof) does not influence redraw times.
Terminal emulation really would be a cool thing to have.
I'm pretty sure that I solved all major problems already (at least on linux). The question is no longer "if" but "when".
Did you know that:
- Code: Select all
closes sublime instantly?
What did you end up doing or plan to do about the combinatoric explosion of the keybindings?
This: Default.sublime-keymap 473 KB (484 945 bytes)
256 color pallete, with combinations of fg & bg == 32640 colors? You don't really need *all* those color combinations though huh?
I didn't even think about doing xterm-256 this way. Unless John adds another API for setting font fg/bg/style, I'm sticking to TERM=linux and 8fg/8bg colors http://pueblo.sourceforge.net/doc/manua ... codes.html
With text styles even ASCII colors are a lot to handle: fg.bg.reverse.strikethrough.underline.underscore = 8*8*2^4 = 1024 styles
EDIT: I could probably cut it down, but it's still in the same range.
I wonder if it would be feasible to allow the the setting of colors directly with view.add_regions?
It would simplify things greatly for xterm-256, but for now it's more important to get rid of region borders.