Sublime Text High Level Navigation Emulated in Emacs

Sublime Text is a new text editor that is designed to be a bit more modern and to primary support text editing why eschewing most of the bells and whistles of more ‘modern’ IDEs.

I thoroughly subscribe to this philosophy which is why I”m such an Emacs addict.

There was once nice feature which I wanted to see if I could prototype in Emacs:

200801181502

It takes the main text area and creates a thumbnail so you can navigate text files from thirty thousand feet.

This would be easy to emulate in Emacs by using buffer local overlays and small fonts.

Here’s a quick prototype I put together in about 30 minutes.

200801181447

The problem is that the font looks a bit jagged on OS X when too small.

I wonder how Sublime Text did this. Did they use a small font or did they take a thumbnail of the text area?

I can’t easily get access to Cocoa primitives under Emacs so this path is out. The other alternative is to find a pixel based fixed width font.

I tried Silkscreen. That didn’t look too great (not fixed width). None of the fonts here work.

Sublime proves that it’s possible to get a decent high level overview of the file but the implementation strategy I’m taking in Emacs probably won’t pan out.

Thoughts?


  1. Sublime text uses some kind of hardware acceleration. I suspect that
    the trick is to actally create two views on the same ‘picture’ and
    simply set the viewpoint of the left on to ‘further away’.






%d bloggers like this: