Vimium: Feature Request - Adjust zoom/fontsize via keypress

Created on 24 Oct 2015  路  8Comments  路  Source: philc/vimium

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.

won't-fix

Most helpful comment

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

All 8 comments

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.

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

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

:(

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

Is this still not possible to implement?

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Poseiden picture Poseiden  路  3Comments

haroldcarr picture haroldcarr  路  4Comments

finalfantasia picture finalfantasia  路  3Comments

ghost picture ghost  路  3Comments

jkbbwr picture jkbbwr  路  3Comments