Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

140 lines (112 sloc) 4.106 kB
" Delete all bookmarks when starting up (because I'll manage them manually).
javascript <<EOF
var bms = services.get("bookmarks");
" Set the default search engine.
set defsearch="g"
" Delete all default search engines when starting up. My own are in searchplugins/ in my profile.
javascript <<EOF
fixSearchEngines = function () {
var bss = services.get("browserSearch");
bss.getDefaultEngines({}).forEach(function (engine) { bss.removeEngine(engine); });
bss.defaultEngine = bss.getEngineByAlias(options.defsearch);
autocmd VimperatorEnter .* :javascript fixSearchEngines();
" A builtin shortener.
javascript <<EOF
shortenURLIsGd = function (url) {
var req = new XMLHttpRequest();"GET", "" + encodeURIComponent(url), true)
req.onreadystatechange = function (ev) {
if (req.readyState == 4) {
if (req.status == 200) {
util.copyToClipboard(req.responseText, true);
} else {
map <silent> gy :javascript shortenURLIsGd(buffer.URL);<CR>
" XPath shortcuts.
javascript <<EOF
var xpUnordered = function(selector) {
return content.document.evaluate(selector, content.document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
var xpExists = function(selector) {
return xpUnordered(selector).snapshotLength > 0;
" On-the-fly CSS class adding based on XPath matches.
javascript <<EOF
var CSSFrickel = function(selector, class) {
var rows = xpUnordered(selector);
for (var i = 0; i < rows.snapshotLength; i++) {
content.document.getElementById(rows.snapshotItem(i).id).className += " " + class;
" Don't warn on about:config.
set! general.warnOnAboutConfig=false
" No close buttons on tabs.
set! browser.tabs.closeButtons=2
" Always display tabs bar, even in fullscreen.
set! browser.tabs.autoHide=false
set! browser.fullscreen.autohide=false
" Allow for smaller and wider tabs.
set! browser.tabs.tabMinWidth=50
set! browser.tabs.tabMaxWidth=4000
" Open in new tabs instead of new windows. Always.
" No automatic update checks.
" FIXME: This check should be a blacklist, not a whitelist.
javascript <<EOF
doAutomaticUpdates = (navigator.platform.match("Mac") != null);
options.setPref("app.update.enabled", doAutomaticUpdates);
options.setPref("", doAutomaticUpdates);
options.setPref("extensions.update.enabled", doAutomaticUpdates);
options.setPref("extensions.update.notifyUser", doAutomaticUpdates);
" No prefetching.
set! network.prefetch-next=false
" Homepage, schmomepage.
set! browser.startup.homepage=""
" Make backspace go back, control-backspace go forward.
map <BS> :back<CR>
map <C-BS> :forward<CR>
" Make Alt-g and Alt-G do default searches.
execute "map <A-g> :open " + options.defsearch + " "
execute "map <A-G> :tabopen " + options.defsearch + " "
" Show a tab number over the tab icon.
set guioptions=Nrb
" Hints for input fields use their label, then their name.
set hintinputs="label,name"
" Open some things that should open in a new tab in a new tab.
set newtab="all"
" Use smart case searches.
set ignorecase smartcase
" Do not use suggest engines.
set suggestengines=""
" Complete awesomely.
set wildoptions="auto" wildmode="list:full"
" Use my own external editor and pass it the current URL.
set editor="scy-vimperator-editor ''"
autocmd LocationChange . :set editor="scy-vimperator-editor '<url>'"
" When going fullscreen, don't let the scroll bar disappear.
autocmd Fullscreen .* :javascript document.getElementById("status-bar").setAttribute("moz-collapsed", false)
" Ring a visual bell on errors.
set errorbells visualbell
" Let me manually focus input elements.
set focuscontent
" Load a local config file, if it exists.
source! ~/.vimperatorrc.local
" Clear the command bar.
Jump to Line
Something went wrong with that request. Please try again.