" {{{ beslayed's pentadactyl configuration with Emacs bindings, based on anrxc's vimperator configuration with Emacs bindings, but with fairly major changes to the bindings " " Bindings " " source: * http://babbagefiles.blogspot.com " (based on: * http://sysphere.org/~anrxc/j/articles/vimperator/index.html) " " Todo (anrcx's) " * C-n and C-p in "INSERT (menu)" mode " * http://code.google.com/p/vimperator-labs/issues/detail?id=36 " License (both) " * http://creativecommons.org/publicdomain/zero/1.0 " }}} " {{{ Options " " Turn off auto-autocompletion (press tab to see autocompletions) set autocomplete= " determine which tabs open with focus set activate=addons,bookmarks,diverted,extoptions,help,homepage,quickmark " pentadactyl gui options set go=rbC " Editor, C-e invokes it in text fields set editor="emacsclient -c" " Show destination links in 1=status line, 2=command line " set showstatuslinks=2 " {{{ Key bindings " - Emacs GTK key-theme and FF already provide bindings for input fields " " C-v was pass-next, remap to bind with default keys noremap " M-x enters command mode noremap : " Emacs navigation in command line and insert mode cmap cmap cmap cmap cmap noremap inoremap inoremap inoremap inoremap inoremap " Use C-f and C-b for page navigation " Also F and B (like Conkeror) noremap :forward noremap :back " Use M-f and M-b for buffer/tab browsing noremap :tabnext noremap :tabprevious " Use C-f and C-b to re-order tabs map :tabmove! -1 map :tabmove! +1 " Select all ("mark entire buffer or field") noremap h inoremap h vnoremap h " Use C-a and C-e to go to the absolute left/right of the document noremap 0 noremap $ " Use C-p and C-n for up/down noremap 2k noremap 2j " Use C-v and M-v for jump scrolling noremap noremap " Goto the top of the document with M-< noremap gg " Goto the end of the document with M-> noremap > G " Use C-s and C-r for searching (n/N for next/prev as in less) noremap / noremap ? " Use M-s and M-r for finding word under cursor noremap * noremap # " Copy selected text to the clipboard with C-w noremap Y inoremap tnoremap " Copy the current URL to the clipboard with M-w noremap y " Yank (i.e. paste) the current clipboard selection with C-y inoremap tnoremap i_ noremap cnoremap vnoremap " Yank (i.e. paste) the current clipboard selection to new background buffer with M-y noremap P " Yank (i.e. paste) the current clipboard selection to a new focussed buffer with C-M-y noremap :tabopen! " C-g as cancel (C-q is stop) (except QuickHint mode, see below) cnoremap inoremap noremap vnoremap " Avoid Find dialog when cancelling a started command, C-x C-g " [note QuickHint mode can only be cancelled by ] noremap " Avoid quit on C-q, and it's more suitable for Stop here noremap :stop " Exit and save the contents of all buffers (=save session) with C-x s noremap s :xall " Exit without saving the session with C-x C-c noremap :quitall " Select another buffer with C-x b noremap b :buffer " List all buffers with C-x C-b noremap :buffers " Close the current tab ("kill buffer") with C-x k " Close the current tab ("delete this window") with C-x 0 noremap k :tabclose noremap 0 :tabclose " Close currently selected window ("delete this frame") with C-x 5 0 noremap 50 :winclose " Undo close tab with C-_ (also with C-Shift-t, as C-t is new tab) " (Also with C-x u, C-/) noremap :undo noremap u :undo noremap :undo " Close all other tabs ("delete all other windows") with C-x 1 noremap 1 :tabonly " Close all other windows ("delete all other frames") with C-x 5 1 noremap 51 :winonly " Switch to previously selected tab ("switch cursor to other window") with C-x o noremap o " Duplicate tab ("split window") with C-x 2 noremap 2 T " Duplicate window ("split frame") with C-x 5 2 noremap 52 W " Open a URL in the current buffer with C-x C-f noremap :open " Open a URL based on current location in the current buffer with C-x C-v " ("replace the contents of this buffer with new URL") noremap O " Open a URL in a new window with C-x 5 f noremap 5f :winopen " Open a URL in a new background tab with C-x t noremap t :tabopen " Open a URL based on current location in new background tab with C-x T noremap T T " Open a URL in a new focussed tab with C-x C-t " with C-x 4 f noremap :tabopen! noremap 4f :tabopen! " QuickHint mode bindings " Follow link using l to open in current buffer " Follow link using L to open in new background tab " Follow link using M-l to open in new focussed tab " [Alt: Follow link using C-x l to open in new focussed tab] " Use neighbouring ; to open extended hint mode (as per standard vimperator) noremap l f noremap L F noremap ;t noremap l ;t " Use C-h r to start pentadactyl help " Use C-h i to go to pentadactyl index " Use C-h t to go to pentadactyl quickstart tutorial " Use C-h I to go to emacslik pentadactyl quickreference card noremap r :help noremap i odactyl://help/index noremap t odactyl://help/tutorial noremap I ohttp://www.jnanam.net/pentadactylemacs/pentadactylemacs.html " Record a key sequence into a macro with C-x ( noremap ( q " Play a macro with C-x e noremap e @ " Set a jump-mark at the cursor with C-x r m noremap rm m " Jump to the jump-mark in the current buffer with C-x r b noremap rb ' " List all jump-marks with C-x r l noremap rl :marks " C-x C-w starts the "Save as" dialog map " {{{ Personal key bindings " " M-Up/Dn toggles the toolbar and scrollbars map :set go+=BTm map :set go-=BTm " Focus last used input field with C-c i map i gi " Add a bookmark with C-c a (dialog) map a " Bookmarks search, and search by tag map q :bmarks map w :bmarks -tags= " Dialog selection with d map d :dialog " View source with C-c g, and map g gf " ... in an editor with C-c e map e gF " Open picture location with C-c p map p ;i " Open context menu with C-c m map m ;c " Open home directory with C-c f map f ~ " Go to home page with C-c h noremap h gh " Go to parent directory with C-c u map u gu " Go to the root of the website with C-c C-u map gU " Restart with C-c C-r map :restart " Turn off certain keybindings :map D :map u :map w :map W :map " {{{ Wikipedia look-up macro " :command -nargs=* wiki tabopen wikipedia " " }}} echo "[pentadactyl initialized]" "------------------------- "Considered " Use C-x C-f to start the "Open File" dialog (currently used for opening new url) "----------------------- "NOT USED " Extended hint mode with M-f " ; - focus link, a - save, y - copy link, O - :open query, T - for :tabopen ... " noremap ; " Use C-a and C-e to jump to first/last tab "noremap g0 "noremap g$ " " Sidebar selection with s, close with S " map s :sidebar " map S :sbclose " Focus the address bar with C-l " map " Tab moving helpers "map :tabmove " }}} " {{{ Javascript functions " " Show the Feed and Bookmark buttons on the statusbar javascript <) " " autocmd LocationChange .* :js modes.passAllKeys = /mail\.google\.com|www\.google\.com\/reader\/view/.test(buffer.URL) " " }}} " {{{ Plugin bindings " " Buftabs map b :set invbuftabs " Noscript map s :noscript toggletemp map S :noscript popup " TinyURL " map t :exe ":tinyurl "+getBrowser().contentWindow.location.href " }}} " }}}