-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvimperatorrc
More file actions
executable file
·103 lines (86 loc) · 4.13 KB
/
vimperatorrc
File metadata and controls
executable file
·103 lines (86 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
" Author: github.com/jak3
colorscheme zenburn
" Section: Options {{{1 --------------------------------------------------------
set gui=nonavigation
set tabnumbers
set hintchars=hjklasdfgyuiopqwertnmzxcvb
set status=input,location,bookmark,history,tabcount,position,ssl,zoomlevel
" set the mapleader key
let mapleader = ","
let g:mapleader = ","
" Section: Search {{{2 ---------------------------------------------------------
" find as you type
set incsearch
" highlight the terms
set hlsearch
" make searches case-insensitive
set ignorecase
" unless they contain upper-case letters
set smartcase
" try to stay in normal mode after loading a web page
set focuscontent
" Section: Mappings {{{1 -------------------------------------------------------
map a :javascript pinboard_add()<CR>
map p :javascript add_unibo_proxy()<CR>
map <silent> l gt
map <silent> h gT
map <silent> s :tabopen google<Space>
map <silent> S :open google<Space>
map <A-r> :restart<CR>
" Usefull URI {{{2
map <silent> <leader>C :tabopen http://meteo.it/previsioni/Cesena/istat-40007<CR>
map <silent> <leader>I :tabopen http://www.irssi.org/documentation<CR>
map <silent> <leader>T :tabopen http://translate.google.it/#it|en|
map <silent> <leader>a :tabopen http://www.asciitable.com/index/asciifull.gif<CR>
map <silent> <leader>b :tabopen http://slackbuilds.org/result/?search=
map <silent> <leader>c :tabopen http://dictionary.cambridge.org/dictionary/british/
map <silent> <leader>d :tabopen http://dictionary.reference.com/browse/
map <silent> <leader>i :tabopen http://www.treccani.it/vocabolario/
map <silent> <leader>k :tabopen http://www.phrack.org/search.html?key=
map <silent> <leader>m :tabopen https://pinboard.in/u:jak3<CR>
map <silent> <leader>t :tabopen http://translate.google.it/#en|it|
map <silent> <leader>u :tabopen http://www.urbandictionary.com/define.php?term=
map <silent> <leader>w :tabopen http://wayback.archive.org/web/*/
map <silent> <leader>y :tabopen https://www.youtube.com/results?search_query=
map <silent> <leader>z :tabopen https://login.ezproxy.unibo.it/menu<CR>
map <silent> <leader>$ :tablast<CR>
map <silent> <leader>0 :tabrewind<CR>
map <silent> <leader>2 :tabduplicate<CR>
map <silent> <leader>J :jumps<CR>
map <silent> <leader>l :reloadall<CR>
map <silent> <leader>n :nohlsearch<CR>
map <silent> <leader>p :winopen -private google<Space>
map <silent> <leader>r :javascript pinboard_readlater()<CR>
map <silent> <leader>s :stopall<CR>
" Plugins {{{2 --------------------------------------------------------
noremap <C-t> :noscript allowpagetemp<CR>
" Section: Commands {{{1 -------------------------------------------------------
command irs -nargs=0 -description "Goto IRS course page" tabopen http://apice.unibo.it/xwiki/bin/view/Courses/IRS1516
command isac -nargs=0 -description "Goto ISAC course page" tabopen http://apice.unibo.it/xwiki/bin/view/Courses/ISAC1516?language=it
" Section: Functions {{{1 ------------------------------------------------------
" Pinboard {{{ 2 ---------------------------------------------------------------
" Thanks to http://www.mozdev.org/pipermail/vimperator/2009-July/004526.html
javascript <<EOF
function pinboard_add(){
with (content) {
url=location.href;
title=document.title;
desc=document.getSelection?document.getSelection():'';
open('https://pinboard.in/add?showtags=yes&url='+encodeURIComponent(url)+'&description='+encodeURIComponent(desc)+'&title='+encodeURIComponent(title));
}
}
function pinboard_readlater(){
with (content) {
url=location.href;
title=document.title;
desc=document.getSelection?document.getSelection():'';
open('https://pinboard.in/add?later=yes&noui=yes&jump=close&url='+encodeURIComponent(url)+'&description='+encodeURIComponent(desc)+'&title='+encodeURIComponent(title));
}
}
function add_unibo_proxy(){
with(content) {
location.host+='.ezproxy.unibo.it';
}
}
EOF
" vim: fdm=marker:ft=vim