Not Centering #6

Closed
magicman86 opened this Issue Dec 22, 2013 · 11 comments

5 participants

@magicman86

Worse on a Mac than you think. It won't start centering until after you have a SCREEN FULL of text. Not just a half-screen like in Windows. Behaves differently as well. I have to fill your screen buffer and then manually place my cursor in the middle, and SOMETIMES it picks up what I'm doing and does the typewriter thing. Not as you have described in your last post. Close this if you want, but please be sure to mark this as not compatible with OSX.

@magicman86

Also, it might be a hack, but you may try adjusting the line-height or adding height to your region that you're centering. You may have luck in tricking the buffer to think it's a different size. You could also do a trailing buffer region and trick it into working for OSX as well.

@alehandrof
Owner

I've put up a short video that shows how the plugin works: https://db.tt/PkdXPqva

I shot the video in Linux, but you should be seeing the same behaviour regardless of the OS. I've had confirmation that this plugin works in OSX, but I don't have access to one myself, so bear with me.

Let's eliminate the obvious, first:

  • What build of Sublime are you using?
  • Is the Typewriter package enabled?
  • Are you using any other packages that provide typewriter scrolling? (BufferScroll and MarkdownEditing are two, there may be others.)
  • Have you enabled typewriter scrolling via the palette (as I do in the video) or via a setting?
@adzenith

Try:

    "scroll_past_end": true,

It's on by default on Win/Lin, but not Mac.

@alehandrof
Owner

This sounds plausible. But I tried setting scroll_past_end to false on Linux (which is what I'm on at the moment) and I can't replicate @magicman86's issue. It would be great if an OSX user could verify whether this setting is causing the issue.

@adzenith

Right, I'm on OS X and it works for me with scroll_past_end.

@alehandrof
Owner
@facelessuser

I imagine he means it scrolls better. By enabling scroll_past_end you extend your scrollable region. Typewriter will always be limited by scrollable region. For instance, you cannot center until a line extends past center of the viewable region. If sublime allowed scrolling past the beginning and end you would then be able to center any line, but that is not currently possible.

@alehandrof
Owner

This is one of those times when I'm an total idiot :)

I tried turning off scroll_past_end earlier, but for some reason I put quotation marks around false and Sublime politely ignored it. So I had not idea what you guys were talking about. I just noticed the typo, removed the quotation mark and yeah, I now understand what the issue is :)

I'll add a note to the README and potentially make the Scrolling mode enable scroll_past_end for good measure.

@adzenith

Yeah, sorry I didn't actually mention I was on OS X! I came here through your forum link and honestly just forgot that that was the important part :P

For what it's worth, I didn't see any issues that looked like what magicman was mentioning.

@fgimian

This thread helped me too (I'm also on OS X) and now the plugin is working, yay! 😄

Is there any way to make it center from the very top of the document (similar to certain Markdown editors) or is this simply not possible due to Sublime plugin API limitations .etc?

@alehandrof
Owner

@fgimian Not that I know of.

Also, I'm closing this issue, as it was resolved by 7405af4.

@alehandrof alehandrof closed this Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment