自定義按鍵映射

Vimium 是一個瀏覽器擴展,它秉承 Vim 編輯器的精神提供基於鍵盤的網絡導航和控制。

https://github.com/philc/vimium/#custom-key-mappings

您可以在選項頁面的“自定義鍵映射”中重新映射或取消映射任何默認鍵綁定。

每行輸入以下鍵映射命令之一:

  • map key command:將鍵映射到 Vimium 命令。覆蓋 Chrome 的默認行為(如果有)。
  • unmap key:取消按鍵映射並恢復 Chrome 的默認行為(如果有)。
  • unmapAll:取消映射所有綁定。如果您想完全擦除 Vimium 的默認設置並從頭開始使用自己的設置,這非常有用。

例子:

  • map <c-d> scrollPageDown將 ctrl+d 映射為向下滾動頁面。Chrome 彈出書籤對話框的默認行為被禁止。
  • map r reload將 r 鍵映射為重新加載頁面。
  • unmap <c-d>刪除 ctrl+d 的所有映射並恢復 Chrome 的默認行為。
  • unmap r刪除 r 鍵的任何映射。

可以通過選項頁面上鍵映射框附近的“顯示可用命令”鏈接找到可用的 Vimium 命令。命令名稱顯示在說明右側的括號中。

"您可以通過以或開頭的行向鍵映射添加註釋#

以下特殊鍵可用於映射:

  • <c-*><a-*><s-*><m-*>分別代表 ctrl、alt、shift 和 meta(Mac 上的命令)以及任意鍵。替換*為選擇的密鑰。
  • <left><right><up><down>為方向鍵。
  • <f1>通過<f12>為功能鍵。
  • <space>為空格鍵。
  • <tab><enter><delete><backspace><insert><home>以及<end>對應的不可打印鍵(版本 1.62 及以上)。

換檔是自動檢測的,例如,<c-&>對應於英文鍵盤上的 ctrl+shift+7。

鍵盤綁定

修飾鍵分別指定為<c-x>ctrl +x、meta+x 和 alt+x 的 、<m-x>和。<a-x>對於 shift+x 和 ctrl-shift-x,只需鍵入X<c-X>。有關如何自定義這些綁定的信息,請參閱下一節。

安裝 Vimium 後,您可以隨時鍵入 來查看此鍵綁定列表?

導航當前頁面:

?       show the help dialog for a list of all available keys
h       scroll left
j       scroll down
k       scroll up
l       scroll right
gg      scroll to top of the page
G       scroll to bottom of the page
d       scroll down half a page
u       scroll up half a page
f       open a link in the current tab
F       open a link in a new tab
r       reload
gs      view source
i       enter insert mode -- all commands will be ignored until you hit Esc to exit
yy      copy the current url to the clipboard
yf      copy a link url to the clipboard
gf      cycle forward to the next frame
gF      focus the main/top frame

導航到新頁面:

o       Open URL, bookmark, or history entry
O       Open URL, bookmark, history entry in a new tab
b       Open bookmark
B       Open bookmark in a new tab

使用查找:

/       enter find mode
          -- type your search query and hit enter to search, or Esc to cancel
n       cycle forward to the next find match
N       cycle backward to the previous find match

有關高級用法,請參閱wiki 上的正則表達式。

瀏覽您的歷史記錄:

H       go back in history
L       go forward in history

操作選項卡:

J, gT   go one tab left
K, gt   go one tab right
g0      go to the first tab. Use ng0 to go to n-th tab
g$      go to the last tab
^       visit the previously-visited tab
t       create tab
yt      duplicate current tab
x       close current tab
X       restore closed tab (i.e. unwind the 'x' command)
T       search through your open tabs
W       move current tab to new window
<a-p>   pin/unpin current tab

使用標記:

ma, mA  set local mark "a" (global mark "A")
`a, `A  jump to local mark "a" (global mark "A")
``      jump back to the position before the previous jump
          -- that is, before the previous gg, G, n, N, / or `a

其他高級瀏覽命令:

]], [[  Follow the link labeled 'next' or '>' ('previous' or '<')
          - helpful for browsing paginated sites
<a-f>   open multiple links in a new tab
gi      focus the first (or n-th) text input box on the page. Use <tab> to cycle through options.
gu      go up one level in the URL hierarchy
gU      go up to root of the URL hierarchy
ge      edit the current URL
gE      edit the current URL and open in a new tab
zH      scroll all the way left
zL      scroll all the way right
v       enter visual mode; use p/P to paste-and-go, use y to yank
V       enter visual line mode

Vimium 支持命令重複,例如,點擊5t將快速連續打開 5 個選項卡。<Esc>(或<c-[>) 將清除隊列中的所有部分命令,並且還將退出插入和查找模式。

有一些高級命令未在此處記錄;請參閱幫助對話框(鍵入?)以獲取完整列表。

新媒體運營,新媒體代運營,cloudneo

原創文章,作者:超哥,如若轉載,請註明出處:https://www.chaoneo.cn/zh-hant/archives/3317.html

0 0 投票
五星評級

如果您覺得超哥分享對您有所幫助的話,記得打賞給我😀

訂閱
提醒
guest
0 評論
內聯反饋
查看所有評論
QQ客服
加我微信
電話聯繫
電子郵件
我們將24小時內回復。
取消
0
喜歡你的想法,請評論x
()
x