zk-phi / sublimity

Smooth-scrolling and minimap like sublime editor
492 stars 27 forks source link

relative-line-numbers breaks centered buffer in sublimity-attractive #26

Open Andre0991 opened 9 years ago

Andre0991 commented 9 years ago

Basically, using relative-line-numbers moves the text to the left of the screen instead of centering it. The max width is still applied, though.

I myself had this sort of problem when I tried to center the text by creating left and right regions some time ago. I couldn't do it because relative-line-numbers creates a region (not sure what's the right word for this) to put the numbers.

I haven't studied the code so I don't know how, but centered-window-mode implements this feature without breaking when relative line is active; if that helps. I tried to migrate to Sublimity because centered-window-mode is slowing down my Emacs.

Thanks for the great package.

zk-phi commented 9 years ago

The difference between centered-window-mode and sublimity seems that, centered-window-mode uses fringes but sublimity uses margins to center the buffer content (like padding vs margin in HTML).

It seems not very difficult to modify sublimity to use padding like centered-window-mode, but I'm not sure why centered-window-mode slows down Emacs so much, since it seems not doing such a heavy task at a glance... I probably should inspect it a bit more before doing that.