4 ms·
This may be of interest: http://feedblog.org/2008/01/18/sublime-text-high-level-navigation-emulated-in-emacs/ http://feedblog.org/2008/01/18/sublime-text-high-l
by jskinner 17y ago
This may be of interest: http://feedblog.org/2008/01/18/sublime-text-high-level-navigation-emulated-in-emacs/ http://feedblog.org/2008/01/18/sublime-text-high-level-navig...
I don't know how easy it would be to integrate into an existing text editor though. Firstly, the rendering itself. I do it via using the GPU to render textured quads, to get trilinear filtering without a big load on the CPU. Without this filtering, the quality goes out the window: standard font rendering algorithms don't render fonts nicely at tiny sized.
The other issue is performance: consider a large file, and just scrubbing up and down with the scroll bar. With the minimap, you have to be able to render thousands of lines of text efficiently, to keep scrolling smooth. I built the rendering structure around this requirement, and I suspect without a lot of attention, typical text rendering code wouldn't be able to layout and draw the text fast enough. Then again, it's not so bad if you would be happy to accept a few limitations, such as fixed width fonts and no soft word wrapping.