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

How to customize the padding height of the begin and end. #374

Closed
RebornHugo opened this issue Aug 21, 2022 · 6 comments
Closed

How to customize the padding height of the begin and end. #374

RebornHugo opened this issue Aug 21, 2022 · 6 comments

Comments

@RebornHugo
Copy link

It seems like the default padding height is 50%.

after typing the gg command

image

after typing the G command

image

I have set background_color 0.0 0.0 0.0, so the padding content is shown in black. Is it possible to disable the beginning and the ending padding?

@ahrm
Copy link
Owner

ahrm commented Aug 21, 2022

There is no "padding". When executing goto_* we center the destination in the middle of screen (which makes sense for example when going to a reference). So when we execute goto_begining, we center the beginning of the document. What you want can be achieved by adding the following to your keys_user.config:

goto_begining;screen_down gg
goto_end;screen_up <S-g>

Note that it would have been better to use something like this:

goto_begining;goto_top_of_page gg
goto_end;goto_bottom_of_page <S-g>

but I just realized there is a bug with goto_bottom_of_page which makes it not work with the last page of the document.

@ahrm
Copy link
Owner

ahrm commented Aug 21, 2022

The bug is fixed in d12b3e7 btw.

@RebornHugo
Copy link
Author

@ahrm It really works! Thank you very much for everything you have done!

@ibehnam
Copy link

ibehnam commented Nov 23, 2022

goto_end;screen_up <S-g> does not work on the macOS version. I also tried goto_end;goto_bottom_of_page <S-g> but that didn't work either. I chose goto_end;goto_top_of_page <S-g> instead and it worked. It makes more sense too (similar to other PDF readers that go to the top of the last page).

@prosoitos
Copy link

Is there a way to have goto_* functions align the result to the top of the screen instead?

There are many situations in which I would prefer this behaviour:

  • the one mentioned here (thank you for the workaround!)
  • when using the table-of-content
  • when using bookmarks
  • etc.

If there is no way to achieve this, might it be possible to add a configuration setting to set this?

Thank you so much!!!

@duguyipiao
Copy link

I just want to mention that the command should be "goto_beginning" instead of "goto_begining", with double "n". The latter one does not work at least in the development branch.

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