News for hackers. Stuff that matters.
Re:Sublime Text by drcode on Thursday September 17, 2009 @12:27PM (#828273)
That minimap is a nice piece of innovation. I'll be waiting until someone ports it to EMACS though :-)
Re:Sublime Text by aristus on Thursday September 17, 2009 @12:42PM (#828330)
I do C-x 3 and load a homebrew "tiny-mode" that shrinks the font size in the second window. Maybe I'll package it up and post it later.
Re:Sublime Text by epe on Thursday September 17, 2009 @12:50PM (#828349)
Please do, I'm curious to take a look at it.
Re:Sublime Text by asdfqwersdf on Thursday September 17, 2009 @07:14PM (#829221)
Here's a first crack at the effect: http://gist.github.com/188773

I'm not much of an elisp programmer, but this seems to work reasonably well. It depends on Emacs 23. To use, load and run mini-map-mode.

Re:Sublime Text by asdfqwersdf on Friday September 18, 2009 @10:26PM (#831564)
Anyone still following this should use the minimap mode at http://www.emacswiki.org/emacs-en/ThingsEmacsCannotDo. It's better in (almost) every way than mine.
Re:Sublime Text by radu_floricica on Friday September 18, 2009 @02:49PM (#830873)
Emacs crashed on M-x mini-map-mode, in Clojure Box.

I pasted the link content into .emacs, downloaded highlight-current-line, and changed the font to Courier New (don't have Consolas). Do you have any ideas?

edit: As far as I can tell, it crashes even with clojure-mode not loaded. Emacs 23.0.91.1, btw.

Re:Sublime Text by jskinner on Thursday September 17, 2009 @08:16PM (#829322)
This may be of interest: 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.