Skip to content


Subversion checkout URL

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

Cannot retrieve contributors at this time

158 lines (123 sloc) 7.031 kB
"2.3.1 (created: 2010/04/07 18:25:13)
" delete any previously defined autocommands in this context
set mapleader=','
set urlseparator='\|'
set guioptions+=N
set! browser.dom.window.dump.enabled=true
set! devtools.errorconsole.enabled=true
" do not activate middle- or ctrl-clicked links
set activate-=links
" search shortcuts (without completion)
command! -nargs=* gg open google <args>
map s :gg<Space>
nmap s :gg<Space>
vmap s :gg<Space>
" command to clear history
" command! clearhist sanitize commandline
" Esc: abort request
noremap <Esc> <C-c><Esc>
noremap <F1> :tab<Space>:help<Space>
" prev/next for german keyboard layout
nmap -s -b ö [[
nmap -s -b ä ]]
" next/prev as single word is rather weak!
set previouspattern='^voriges Angebot$',^<$,^<(?!<),[^<]<$,'^prev|previous|früher|zurück$','vorige Seite|next page',^(<<|«|‹)$,^«,«$,^‹,'\bprev|previous|zurück\b'
set nextpattern='^nächstes Angebot$',^>$,^>(?!>),[^>]>$,'\bvor(wärts)?\b','^next|more|weiter|später$','nächste Seite|next page',^(>>|»|›)$,^»,»$,›$,'\bnext|more|weiter\b'
set popups=tab,resized
" A builtin shortener.
" Based on
javascript <<EOF
function shortenURLBitLy (url) {
var req = new XMLHttpRequest();"GET", "" + encodeURIComponent(url), true)
req.onreadystatechange = function (ev) {
if (req.readyState == 4) {
if (req.status == 200) {
dactyl.clipboardWrite(req.responseText.replace(/\s+$/, ''), true);
} else {
map -silent gy -js shortenURLBitLy(buffer.URL)
" Firefox Sync: connect+sync on startup, sync on exit (does not appear to work)
" NOTE: gets triggered when opening a new window, too. With some Sync UI again in the status bar, this is not necessary anymore.
"autocmd VimperatorEnter .* emenu Tools.Sync.Connect
"autocmd VimperatorEnter .* emenu Tools.Sync.Sync Now
"autocmd VimperatorLeavePre .* emenu Tools.Sync.Sync Now
colorscheme blueyed
set errorbells visualbell
" rss-icon in statusbar, via
javascript <<EOF
var feedButton = document.getElementById("feed-button");
if ( feedButton ) {
var feedPanel = document.createElement("statusbarpanel");
feedPanel.setAttribute("id", "feed-panel-clone");
feedPanel.firstChild.setAttribute("style", "padding: 0; max-height: 16px;");
.insertBefore(feedPanel, document.getElementById("security-button"));
" reddit tips (via
" open current page with reddit toolbar (allows submitting)
nmap e -js"" + encodeURIComponent(buffer.uri.spec))
" add bookmark for subreddits (":o r")
"bma -k=r
" focus content frame (workaround for FF4?!)
" XXX: content.wrappedJSObject.frames["inner_toolbar"] ...
"autocmd PageLoad ^* js content.window.frames[1].window.frames[1].focus()
" command to replace all image links with the actual image (most useful with post-a-picture threads)
" based on some snippet from reddit, but adopted for Vimperator; add allFrames and maxHeight handling
command! inlineimages js (function($) {orig$=$; $.each(buffer.allFrames, function(){win=this.wrappedJSObject; $=function(sel){return orig$(sel, win.document)} ; win.document.ondragstart=function(){return false};dst=function(e){return (p=Math.pow)(p(e.clientX-(,2)+p(,2),.5)};$("[href~=imgur]").not($(t="[href$=jpeg],[href$=gif],[href$=png],[href$=jpg]")).each(function(){this.href+='.jpg'});void($(t).not(".EGraw").attr({'class':'EGraw',target:'blank'}).each(function(){$(this).append($('<span />').toggle(function(e){$(this).html(' [-]').next().show();return false},function(e){$(this).html(' [+]').next().hide();return false}).click()).append($('<img>').attr({src:this.href,style:'display:block;max-width:500px;max-height:500px',title:'Drag to resize'}).mousedown(function(e){(t=this.wrappedJSObject).iw=t.width;t.d=dst(e);t.dr=false;"none";e.preventDefault();}).mousemove(function(e){if((t=this.wrappedJSObject).d){*t.iw/t.d)+"px";t.dr=true}}).mouseout(f=function(e){(t=this.wrappedJSObject).d=false;if(t.dr)return false}).click(f))}))})})(content.wrappedJSObject.$ || $);
" search in a new tab
map <Leader>l :to
" Open current location via Coral CDN
" String.replace is a workaround for
map gp -js String.replace(buffer.URL, /(\.\w{2,4})\//, "$") )
" Clear mapping for Ubiquity
map <C-k> <Nop>
" NoScript popup
map <Leader>np -ex noscript popup
silent qmark n | |
silent qmark r
silent qmark t
silent qmark g
group! editor
autocmd LocationChange .* :set editor='gvim -f -c ''set ft=html spell | call cursor(<line>, <column>)'''
autocmd LocationChange,, :set editor='gvim -f -c ''set ft=markdown spell | call cursor(<line>, <column>)'''
autocmd LocationChange ^https?://mail\\..* :set editor='gvim -f -c ''set ft=mail spell | call cursor(<line>, <column>)'''
autocmd LocationChange ^https?://[^/]+/phpmyadmin/ :set editor='gvim -f -c ''set ft=html | call cursor(<line>, <column>)'''
autocmd LocationChange ^https?://.*trac.*/wiki/ :set editor='gvim -f -c ''set ft=tracwiki | call cursor(<line>, <column>)'''
group default
" passthrough certain keys, see "h key-sequence" for a list
set passkeys+='https://mail\.':<Left><Right><Up><Down><Del>
" use homerow for hintkeys; see also
set hintkeys=asdfgöälkjh
" center_select plugin:
nnoremap -silent zz :centerselect<CR>
"nnoremap -silent zz :centerselect "border: 5px solid orange;"<CR>
"nnoremap -silent n n:norm zz<CR>
"nnoremap -silent N N:norm zz<CR>
nnoremap zH 10h
nnoremap zL 10l
nnoremap j 5j
nnoremap k 5k
nnoremap l 5l
nnoremap h 5h
nnoremap -silent zt :topselect<CR>
nnoremap -silent zb :bottomselect<CR>
nnoremap -silent zc :removeselect<CR>
" tab-options plugin:
"set tabclose=opener,previous,left,right
" Focus largest frame. This replaces the auto-focus-frame.js plugin. Props @John-Galt!
au PageLoad .* -js function area(w) w.innerWidth * w.innerHeight; buffer.allFrames( (w, acc) area(w) > area(acc) ? w : acc).focus()
source! ~/.pentadactylrc.local
" vim: set ft=pentadactyl.vim:
Jump to Line
Something went wrong with that request. Please try again.