2014-08-30 05:29:19 +00:00
|
|
|
set runtimepath=~/etc/vimperator
|
|
|
|
|
|
|
|
set gui=none,tabs
|
|
|
|
"set tabnumbers
|
|
|
|
|
|
|
|
set defsearch=g
|
|
|
|
|
|
|
|
" follow hints on return
|
|
|
|
set followhints=1
|
|
|
|
|
2014-08-30 06:15:51 +00:00
|
|
|
" don't auto-focus input fields
|
|
|
|
set focuscontent
|
|
|
|
|
2014-08-30 05:29:19 +00:00
|
|
|
set incsearch hlsearch
|
|
|
|
set ignorecase smartcase
|
|
|
|
|
|
|
|
set noerrorbells novisualbell
|
|
|
|
js liberator.beep = function() { return false; }
|
|
|
|
|
2014-08-30 06:15:51 +00:00
|
|
|
map d :tabclose<CR>
|
|
|
|
|
2014-08-30 05:29:19 +00:00
|
|
|
" google
|
|
|
|
map s og<Space>
|
|
|
|
map S tg<Space>
|
|
|
|
|
|
|
|
" fast scrolling
|
|
|
|
noremap j <Down>
|
|
|
|
noremap k <Up>
|
|
|
|
|
|
|
|
let g:wallabag_url="https://wllbg.gebner.org"
|
|
|
|
|
|
|
|
js <<EOM
|
|
|
|
googleTranslate = function() {
|
|
|
|
let getParameterByName = function(url, name) {
|
|
|
|
let name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]');
|
|
|
|
let regexS = '[\\?&]' + name + '=([^&#]*)';
|
|
|
|
let regex = new RegExp(regexS);
|
|
|
|
let results = regex.exec(url);
|
|
|
|
if (results == null)
|
|
|
|
return '';
|
|
|
|
else
|
|
|
|
return decodeURIComponent(results[1].replace(/\+/g, ' '));
|
|
|
|
};
|
|
|
|
if (buffer.URL.startsWith('http://translate.google.com/')) {
|
|
|
|
liberator.open(getParameterByName(buffer.URL, 'u'));
|
|
|
|
} else {
|
|
|
|
liberator.open('http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=' + encodeURIComponent(buffer.URL));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOM
|
|
|
|
command! translate js googleTranslate();
|
|
|
|
|
|
|
|
" FIXME: doesn't work?
|
|
|
|
loadplugins
|
|
|
|
fmaps -u='https://reader.gebner.org/' fr u <C-Up> <C-Down> <Up> <Down>
|