vimium icon indicating copy to clipboard operation
vimium copied to clipboard

Feature Request - Adjust zoom/fontsize via keypress

Open idvorkin opened this issue 9 years ago • 12 comments

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.

idvorkin avatar Oct 24 '15 14:10 idvorkin

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.

friday avatar Nov 04 '15 23:11 friday

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

mrmr1993 avatar Nov 05 '15 01:11 mrmr1993

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".

friday avatar Nov 05 '15 01:11 friday

:(

idvorkin avatar Apr 09 '16 18:04 idvorkin

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..

alphaCTzo7G avatar Sep 30 '17 17:09 alphaCTzo7G

Is this still not possible to implement?

lindhe avatar Mar 06 '18 08:03 lindhe

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

smblott-github avatar Mar 06 '18 10:03 smblott-github

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

aarongaber avatar Sep 27 '20 04:09 aarongaber

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 avatar Jul 10 '21 04:07 philc

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

deivi98 avatar Feb 08 '22 19:02 deivi98

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).

gdh1995 avatar Feb 10 '22 07:02 gdh1995

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

leitao avatar Jul 16 '22 07:07 leitao

Would love to see this implemented!

dkotik avatar Feb 22 '23 14:02 dkotik

is it possible to make effect not of ctrl + but instead of actual page zoom that just zooms in on the content where our cursor is or maybe center of page from where we can use hjkl to move around

alphaprads avatar Jun 12 '23 16:06 alphaprads