Created
March 13, 2014 00:11
-
-
Save flipsi/9519394 to your computer and use it in GitHub Desktop.
Vimperator Configuration File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" This is a configuration file for Vimperator. | |
" Philipp Moers <soziflip funny character gmail dot com> | |
"""" SETTINGS """" | |
" open new tabs in background | |
set! browser.tabs.loadInBackground=false | |
set editor='/usr/bin/subl' | |
"""" KEYBINDINGS """" | |
" scroll amount with j and k | |
" smooziee addon needs to be installed | |
let g:smooziee_scroll_amount="240" | |
" scroll down with alt space and up with alt m | |
" DOES NOT WORK | |
noremap <A-Space> <C-d> | |
noremap <A-m> <C-d> | |
" remap escape key | |
noremap <A-i> <Esc> | |
inoremap <A-i> <Esc> | |
cnoremap <A-i> <Esc> | |
" move cursor in insert (or command) mode | |
" characterwise | |
inoremap <A-h> <Left> | |
cnoremap <A-h> <Left> | |
inoremap <A-l> <Right> | |
cnoremap <A-l> <Right> | |
" wordwise | |
inoremap <A-b> <C-Left> | |
cnoremap <A-b> <C-Left> | |
inoremap <A-f> <C-Right> | |
cnoremap <A-f> <C-Right> | |
" bol / eol | |
inoremap <A-a> <C-a> | |
cnoremap <A-a> <C-a> | |
inoremap <A-e> <C-e> | |
cnoremap <A-e> <C-e> | |
" delete last word | |
inoremap <A-BS> <C-W> | |
cnoremap <A-BS> <C-W> | |
" open quickmark in new tab | |
noremap gt gn | |
" switch tabs | |
noremap <A-p> :tabprevious<CR> | |
inoremap <A-p> <Esc>:tabprevious<CR> | |
noremap <A-n> :tabnext<CR> | |
inoremap <A-n> <Esc>:tabnext<CR> | |
" move tab | |
noremap <A-S-p> i<C-S-PageUp> | |
noremap <A-S-n> i<C-S-PageDown> | |
" forward and backward | |
noremap <A-u> :back<CR> | |
noremap <A-o> :forward<CR> | |
" find dialog | |
noremap \- i<C-f> | |
noremap <C-f> i<C-f> | |
" Copy as usual | |
noremap <C-c> i<C-c> | |
" copy whole line after searching | |
noremap <C-S-c> <Esc>cv$<C-c><Esc><Esc> | |
" Noscript AddOn | |
noremap st :noscript toggletemp<CR> | |
noremap sp :noscript toggleperm<CR> | |
" run through command history with ^P and ^N | |
cnoremap <C-p> <Up> | |
cnoremap <C-n> <Down> | |
" jump to mark | |
noremap ä ' | |
" console | |
noremap <C-A-c> i<C-S-k> | |
" bookmarks sorted by date | |
:js <<EOF | |
bmarksbydate = function() { | |
let bookmarksService = services.get("bookmarks"); | |
let bookmarks = storage["bookmark-cache"].bookmarks; | |
let idToDate = Object.create(null); | |
for (let item of bookmarks) | |
idToDate[item.id] = bookmarksService.getItemDateAdded(item.id); | |
completion.listCompleter(function(context, tags, extra) { | |
completion.bookmark(context, tags, extra); | |
context.compare = function (a,b) (idToDate[b.item.id] - idToDate[a.item.id]); | |
}, undefined, undefined, undefined, undefined, CompletionContext.Filter.textAndDescription); | |
} | |
EOF | |
command bmarksbydate js bmarksbydate() | |
map <silent> b :js bmarksbydate()<CR> | |
echo "vimperatorrc sourced successfully" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment