[关闭]
@woshichuanqilz 2015-11-01T08:26:19.000000Z 字数 739 阅读 1456

Vimperator 实现快捷键修改 firefox的Style

firefox


这个例子的核心是在Vimperator中调用一个JavaScript。

下面这段文字写到Vimperatorrc里面就可以了。

  1. " Change firefox style
  2. nnoremap <silent> <A-s> :js ChangeStyle()<CR>
  3. js <<EOF
  4. ChangeStyle = function() {
  5. var id = [1];
  6. var service = Components.classes["@userstyles.org/style;1"].getService(Components.interfaces.stylishStyle)
  7. for (var i=0; i < id.length; i++){
  8. var style = service.find(id[i], service.REGISTER_STYLE_ON_CHANGE);
  9. style.enabled = !style.enabled;
  10. style.save();
  11. }
  12. }
  13. EOF

做这个问题困扰我的东西是, 网上下载的一个Vimperatorrc的文件中有一句是错误的, 导致后面的设置没有生效, 而我在写这个东西的时候, 就是接在这个句子后面写的这个函数。救国导致问题。
所以, 还希望大家能够注意到这个问题避免弯路。

How to change the color of the command line in Vimperator .

  1. Depending on the mode, that would probably be the CmdLine highlighting:
  2. highlight CmdLine background: #191919; color: #afafaf; font-size: 9pt;
  3. See :highlight.
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注