Vimium: 以 Vim 的方式操作 Google Chrome

vi/Vim 的按键设置方案可说是非常经典,有的程序或对其直接予以支持(如 bash),或通过插件/扩展的形式实现一定程度的模拟。Vimium 就是这样一个 Google Chrome 扩展,它让你以 Vim 的方式来操作 Google Chrome 网络浏览器,既可以减少学习新按键设置的成本,又能够提高操作的效率。

Vimium

目前,Vimium 包括页面浏览、历史、标签页等方面的按键设置以及通过字母形式的 Hint 来处理链接的打开。相比另一个 Google Chrome 扩展 Vimlike Smooziee, Vimium 的功能要少点儿,但基本可用。

安装 Vimium

Vimium 的源代码主机在 github 上,因此要获取它,你需要 Git 工具,在准备好之后,在终端中执行以下命令:

git clone git://github.com/philc/vimium.git

然后在 Google Chrome 的扩展页面中通过“Load unpacked extension...”按钮并定位到 Vimium 的源代码目录,接着按提示操作即可。

Vimium 用法

页面浏览

  • j、k、h、l:向下/上/左/右滚动
  • gg 和 G:移至页顶/页底
  • Ctrl + d 和 Ctrl + u:下/上翻页
  • zi 和 zo:放大/缩小

历史

  • H:后退
  • L:前进

标签页

  • t:打开新标签
  • d:关闭标签
  • u:还原标签
  • J/K:下/上一个标签

Hint 模式

  • f/F:进入 Hint 模式,后者会在新标签页中打开链接

提示

通过更改源代码目录中的 background_page.html 文件可以重新绑定新的按键,以适合你的使用习惯。

Read More:

  • No related posts

20 Comments

  1. 1 Yeqin_Su Commented @ 2009-12-13 18:11Reply to this comment

    哈,这个也算一种创新,纯支持了,最近光荣的回到了我的firefox,还是火狐好……呵呵

  2. 2 kilior Commented @ 2009-12-13 18:14Reply to this comment

    google的控制欲太强,我只用gmail。wave过一段时间就很有可能休息了。

  3. 3 kilior Commented @ 2009-12-13 18:14Reply to this comment

    搜索还是要用的。

  4. 4 Iven Commented @ 2009-12-13 18:40Reply to this comment

    Vim 控拯救世界……

  5. 5 Jinzhu Commented @ 2009-12-13 18:47Reply to this comment

    http://github.com/jinzhu/vimlike-smooziee

    这是我修改的 Vimlike Smooziee版本,
    加上

    上下页 [[ / ]] 的支持
    对 ajax 连接的支持
    select 的支持
    中文拼音的支持,如果一个连接的名字是 “History(历史)命令用法 15 例” ,你可以输入 mlff ,你可以输入 mly (命令用法汉语拼音的首字节)来打开这个连接
    C-z 暂时停止快捷键
    记录网站的放大倍数...等功能

    使用这个连接安装: http://github.com/jinzhu/vimlike-smooziee/raw/master/vimlike-smooziee.crx
    安装这个版本前,先将官方版本删掉,再安装
    如果你想在本地修改脚本的话,git clone git@github.com:jinzhu/vimlike-smooziee.git
    尽情修改,然后运行 rake install 安装 (欢迎回馈patch)

    PS: 近期我要再对这个插件进行一次彻底的重构,让代码更加模块化,并会再添加大量的功能,例如搜索功能等等,敬请等待 ;)

  6. 6 Jinzhu Commented @ 2009-12-13 18:48Reply to this comment

    呃,上面的格式给乱掉了。。。。

  7. 7 levon Commented @ 2009-12-13 18:51Reply to this comment

    我终于会用git了,感谢作者

  8. 8 kidfruit Commented @ 2009-12-13 19:25Reply to this comment

    以前firefox也有这种vim控件,挺好用。

  9. 9 levend Commented @ 2009-12-13 21:07Reply to this comment

    chrome的标签怎么变成那样的?

  10. 10 xifs Commented @ 2009-12-13 21:51Reply to this comment

    看来大家都认为鼠标很邪恶

  11. 11 fkw Commented @ 2009-12-13 21:58Reply to this comment

    如果还有ad block就完美了。

  12. 12 wangjl Commented @ 2009-12-13 22:10Reply to this comment

    这个杀手应用终于有人做了

  13. 13 wangjl Commented @ 2009-12-13 22:14Reply to this comment

    不过我还是希望能更接近vimperator的快捷键

  14. 14 HalloKetty Commented @ 2009-12-13 22:40Reply to this comment

    纯支持vimperator

  15. 15 阿凡提 Commented @ 2009-12-13 23:04Reply to this comment

    @Jinzhu: 正在试用,希望作者早日让作品达到Vimperator的威力!

  16. 16 Toy Commented @ 2009-12-14 14:16Reply to this comment

    @levend: 标签上点右键,选 Pin Tab。

    @Jinzhu: 改得不错,谢谢。

  17. 17 seenxu Commented @ 2009-12-14 17:09Reply to this comment

    @Jinzhu: 感谢一下,辛苦了!

  18. 18 Jinzhu Commented @ 2009-12-14 17:47Reply to this comment

    @阿凡提: @Toy: @seenxu:

    欢迎大家多提使用过程中的想法,意见,Patch,批评 ;0

  19. 19 Tommy Commented @ 2009-12-19 9:16Reply to this comment

    就像楼上说的,希望能早日达到vimperator的高度 :)

  20. 20 virteman Commented @ 2009-12-29 23:05Reply to this comment

    呵呵,这个类似vimperator ( firefox类vim的插件),支持这个