Archive for December 16, 2010

Illegal names in vimperator

It appears that command names in vimperator with underscores are illegal. This confused me for a little while. (There error message is helpfullly indistinguishable from if you hadn’t defined the command)

December 16, 2010 at 2:59 pm Leave a comment

Setting preferences in vimperator

I found out recently that vimperator has builtin commands to set preferences from its command line.

So, for example:

set! network.proxy.http = ‘myproxy.com’

followed by

set! network.proxy.type = 1

will switch on an existing http proxy.

Things are slightly different if you want to do things from javascript addons. Here you need to use the XPCOM interfaces. The following javascript code adds a noproxy command to clear your proxy settings.

js <<EOF
commands.addUserCommand(['noproxy'],
    'Switch off proxy',
    function (args) {
        pref.setIntPref('network.proxy.type', 0);
    },
    {},
    true
);
EOF

December 16, 2010 at 2:57 pm Leave a comment


December 2010
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031