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

Feature Request - Adjust zoom/fontsize via keypress #1866

Closed
idvorkin opened this issue Oct 24, 2015 · 15 comments · Fixed by #4488 · May be fixed by #4367
Closed

Feature Request - Adjust zoom/fontsize via keypress #1866

idvorkin opened this issue Oct 24, 2015 · 15 comments · Fixed by #4488 · May be fixed by #4367

Comments

@idvorkin
Copy link

Being able to adjust font size via key press is super handy. There is currently a vim script that has this behavior, and the script gives a good precedent. The script uses the following keybindings:

\\+ => Zoom Bigger
\\++ => Zoom 2x Bigger 
\\+++ => Zoom 3x Bigger 
(etc)
\\- => Zoom Smaller
\\-- => Zoom 2x Smaller
\\---- => Zoom 3x Smaller 
(etc)

I suspect many users would find this a helpful functionality.

@friday
Copy link

friday commented Nov 4, 2015

Changing text size isn't possible because it's defined by a set of absolute or relative measures defined by the developer(s) of the page/site/app. But you can zoom, which changes the size of all content including text. Ctrl or cmd + and - does this. You can probably remap them outside of vimium, but not to single keys (so it would still be ctrl + something).

Trying to do it with javascript would probably break designs. CSS transforms gives you larger viewport size (so you get vertical and horizontal scrollbars). Meta viewport can't be changed after the page loads.

@mrmr1993
Copy link
Contributor

mrmr1993 commented Nov 5, 2015

There seems to be a zoom API for Chrome extensions here, does that fit the bill?

@friday
Copy link

friday commented Nov 5, 2015

I missed that one. Looks good to me. "These settings are reset to defaults upon navigating the tab." could be a problem, but I'm not sure how to interpret "navigating".

@idvorkin
Copy link
Author

idvorkin commented Apr 9, 2016

:(

@alphaCTzo7G
Copy link
Contributor

Yeah.. I would love to see something like a zi or zo to zoom in and out without having to use the cntrl + or control - chrome keys. A lot of things that vimium covers can be done with chrome shortcuts, but the reason we love vimium is because we can do them much faster with a vim like browsing language - Vimium. For example https://github.com/jinzhu/vrome/blob/master/Features.mkd, https://github.com/1995eaton/chromium-vim both support "programmatic" zoom in and zoom out.. using zi and zo..

I know this thread started a long time back, but I couldnt find any information about whether this has already been implemented or not.

I found this cheatsheet online which mentions zi and zo for zooming in and out.. but it doesnt work for me. Tried on multiple computers, by disabling every other plugin, incognito mode etc..

Maybe something that can be implemented in future..

@lindhe
Copy link

lindhe commented Mar 6, 2018

Is this still not possible to implement?

@smblott-github
Copy link
Collaborator

The implementation for cVim is here.

I think we should consider doing this; perhaps like this...

map X zoom in factor=1.1
map Y zoom out factor = 1.1
map Z zoom reset

@aarongaber
Copy link

Zoomba Chrome extension worked for me :) I used shift+alt+i/o so it wouldn't interfere with the "o" and "i" Vimium key bindings. https://chrome.google.com/webstore/detail/zoomba/oifpkclgpipladdnaioaehmmccmljblh

@philc
Copy link
Owner

philc commented Jul 10, 2021

There's some good discussion of the implementation of this feature in PR #2978, but that PR is now out-dated, so if someone wants to take a stab at this, please give it a shot.

@philc philc reopened this Jul 10, 2021
@deivi98
Copy link

deivi98 commented Feb 8, 2022

Any update on this? I would really like to have zi, zo just as Vim Vixen in Firefox does.

@gdh1995
Copy link
Contributor

gdh1995 commented Feb 10, 2022

Hello, you may use my customized version of Vimium, Vimium C (https://github.com/gdh1995/vimium-c), and it supports zoomIn, zoomOut and zoomReset (zoom in, zoom out and zoom reset also work).

@leitao
Copy link

leitao commented Jul 16, 2022

sakka-key has this feature (zz and ZZ) and they work pretty fine. I miss this feature in vimium

@dkotik
Copy link

dkotik commented Feb 22, 2023

Would love to see this implemented!

@meronogbai
Copy link

@philc TYSM for this! Will you release an update to chrome's extension store soon?

@UncleSnail
Copy link
Contributor

UncleSnail commented Oct 9, 2024

@philc TYSM for this! Will you release an update to chrome's extension store soon?

If you want the "manual overhead" of using a different addon file until it is released to the main extension store, you can clone the project to a local repository and load that extension into the browser, which is covered in CONTRIBUTING.md.

I use Firefox, so I also keep a signed ext file, that you can add to Firefox and install normally, with my latest changes before they are in the main addon. This is what I personally run in my browser so I have all the latest features. Anyone who wishes can get it from my fork of Vimium. I generally update it whenever I make a pull request. The current file has the zoom commands and the updates to the help page to properly show the new hard reload shortcut and any setZoom 1.5 etc commands.

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