[Vimperator] what about this new feature?
yichao.zhang
yichao.zhang at gmail.com
Mon Sep 10 07:10:57 PDT 2007
Hi olivier,
Thanks to vimperator's good design, it's easy to add that feature.
in vimperator/src/chrome/content/vimperator/mappings.js:
the mapping "P" implemented by:
addDefaultMap(new Map([vimperator.modes.NORMAL], ["P"],
function()
{
vimperator.open(readFromClipboard(),
/\bpaste\b/.test(vimperator.options["activate"]) ?
vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB);
},
{}
));
readFromClipboard() is a function from mozilla/browser/base/content/browser.js
and browser.js also provides a function getBrowserSelection(aCharLen).
so I just added a mapping that replacing readFromClipboard() by
getBrowserSelection(150).
-Yichao
More information about the Vimperator
mailing list