Setting preferences in vimperator

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

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
Advertisements

Entry filed under: Uncategorized. Tags: , , , .

When the actor pattern does not do anything for you Illegal names in vimperator

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


December 2010
M T W T F S S
« Nov   Feb »
 12345
6789101112
13141516171819
20212223242526
2728293031  

%d bloggers like this: