Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Centering #6

Closed
magikworx opened this issue Dec 22, 2013 · 11 comments
Closed

Not Centering #6

magikworx opened this issue Dec 22, 2013 · 11 comments

Comments

@magikworx
Copy link

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.

@magikworx
Copy link
Author

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
Copy link
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
Copy link

adzenith commented Apr 6, 2014

Try:

    "scroll_past_end": true,

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

@alehandrof
Copy link
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
Copy link

adzenith commented Apr 6, 2014

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

@alehandrof
Copy link
Owner

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

Cool. Thanks for taking the time to help out.

I don't mean to belabor the point but are you saying that it works with
scroll_past_end set true and doesn't when it is set to false?

@facelessuser
Copy link

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
Copy link
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
Copy link

adzenith commented Apr 7, 2014

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
Copy link

fgimian commented Jun 1, 2016

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
Copy link
Owner

@fgimian Not that I know of.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants