您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在网页中提供 Vim 风格操作:滚动(hjkl / d u / gg G)、链接提示(f/F)、查找(/ n/N)、历史(H/L)、页面操作(r t x*)、杂项(yy p o ?)。已针对 UserScript 权限做安全降级。
A Tampermonkey userscript that brings Vim-style navigation to the web:
hjkl
, d/u
, gg/G
f
/ F
/
, n
/ N
H
/ L
r
, t
, x*
yy
, p
, o
, ?
*
x
can only close tabs that were opened by scripts (browser restriction).
h
/ l
— scroll left/rightj
/ k
— scroll down/upd
/ u
— page down/up (distance = baseStep + extraPage
)gg
/ G
— jump to top/bottomf
— open hinted link in current tabF
— open hinted link in new tab (uses GM_openInTab
→ window.open
fallback)/
— open lightweight find barn
/ N
— next / previous match (based on window.find
)H
— back, L
— forwardr
— reload, t
— new tab, x
— close tab*J/K
tab switching is not available in UserScript due to browser permissions.yy
— copy current page URL (clipboard API / GM fallback)p
— open URL from clipboard (or prompt fallback)o
— open URL or search (prompt)?
— help overlaySmart input detection: Hotkeys are disabled inside
INPUT
/TEXTAREA
/SELECT
/contentEditable
/designMode=on
.
Open Tampermonkey → this script → Menu Commands to adjust:
baseStep
, default 100
)extraPage
, default 300
)ggIntervalMs
, default 600
ms)useNativeSmooth
, on/off)ignoreWithModifier
, on/off)/.*\.notion\.site\//
)hintChars
), Hint Max Letters (hintMaxLetters
)GM_openInTab
, GM_setClipboard
, GM_getValue/GM_setValue
, GM_registerMenuCommand
.x
doesn’t close: Browsers only allow scripts to close tabs that they opened.Category | Keys | Action |
---|---|---|
Scroll | j / k | Down / Up |
h / l | Left / Right | |
d / u | Page Down / Up (base+extra) | |
gg / G | Top / Bottom | |
Hint | f / F | Open link (current / new tab) |
Find | /, n / N | Open find, Next / Prev |
History | H / L | Back / Forward |
Page | r / t / x | Reload / New tab / Close tab* |
Misc | yy / p / o / ? | Copy URL / Open from clipboard / Open or search / Help |
MIT License © Wenbo Bian