-
Notifications
You must be signed in to change notification settings - Fork 4
/
pentadactylrc
151 lines (141 loc) · 6.02 KB
/
pentadactylrc
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
" General {{{1
" 只显示底部可能存在的滚动条,以及标签栏的编号
set guioptions=bsCn
" 不要自动补全,除非 b 显示 buffer
set autocomplete=/ex/buffer,^(/|/ex/?)$
" Shell
set shell="/usr/bin/zsh"
" 编辑器
set editor="urxvt -e vim -f"
" 搜索关键字高亮
set hlfind
" 状态栏的背景色
hi StatusLineNormal color: black !important; background: transparent !important;
" 可视提示
set visualbell
" }}}
" Key bindings {{{1
" 下一个标签页
map . <C-PageDown><C-L>
" 上一个标签页
map , <C-PageUp><C-L>
" 下一个标签组
map <C-.> <C-S-n><C-L>
" 上一个标签组
map <C-,> <C-S-p><C-L>
" 向上翻页
map -- - <C-b>
" 向下翻页
map <Space> <C-d>
" 好像最近(201304)版本内置的删除模式已更新
" 交换 d/D
" map -builtin d D
" map -builtin D d
" 前进
map \\ <C-i>
" 后退
map <BS> <C-o>
" 向下滚动2行
map j 2<C-e>
" 向上滚动2行
map k 2<C-y>
" 关闭窗口
map <C-q> :winclose<CR>
" 右移当前标签页
map <A-.> :tabm +1<CR>
" 左移当前标>??页
map <A-,> :tabm -1<CR>
" 切换之前选择的标签页
map <A-`> <C-^><C-L>
" 避免和 diigo 冲突
map <C-a> <Nop>
" 切换标签页 {{{2
map <A-0><A-0> g0
map <A-0><A-9> g$
map <A-9> 9gt
map <A-0><A-1><A-0> 10gt
map <A-0><A-1><A-1> 11gt
map <A-0><A-1><A-2> 12gt
map <A-0><A-1><A-3> 13gt
map <A-0><A-1><A-4> 14gt
map <A-0><A-1><A-5> 15gt
map <A-0><A-1><A-6> 16gt
map <A-0><A-1><A-7> 17gt
map <A-0><A-1><A-8> 18gt
map <A-0><A-1><A-9> 19gt
map <A-0><A-2><A-0> 20gt
map <A-0><A-2><A-1> 21gt
map <A-0><A-2><A-2> 22gt
map <A-0><A-2><A-3> 23gt
map <A-0><A-2><A-4> 24gt
map <A-0><A-2><A-5> 25gt
map <A-0><A-2><A-6> 26gt
map <A-0><A-2><A-7> 27gt
map <A-0><A-2><A-8> 28gt
map <A-0><A-2><A-9> 29gt
map <A-0><A-3><A-0> 30gt
map <A-0><A-3><A-1> 31gt
map <A-0><A-3><A-2> 32gt
map <A-0><A-3><A-3> 33gt
map <A-0><A-3><A-4> 34gt
map <A-0><A-3><A-5> 35gt
map <A-0><A-3><A-6> 36gt
map <A-0><A-3><A-7> 37gt
map <A-0><A-3><A-8> 38gt
map <A-0><A-3><A-9> 39gt
" }}}2
" 切换当前页面编码
map <silent> <F2> :set encoding=Shift_JIS<CR>:echo 'Shift_JIS'<CR>
map <silent> <F3> :set encoding=EUC-JP<CR>:echo 'EUC-JP'<CR>
map <silent> <F4> :set encoding=ISO-2022-JP<CR>:echo 'ISO-2022-JP'<CR>
map <silent> <F5> :set encoding=UTF-8<CR>:echo 'UTF-8'<CR>
map <silent> <F6> :set encoding=BIG5<CR>:echo 'BIG5'<CR>
map <silent> <F7> :set encoding=GB2312<CR>:echo 'GB2312'<CR>
" https://github.com/claytron/dotfiles/master/.pentadactylrc {{{2
" bring back/hide portions of the GUI
map -builtin <silent> ;g :set guioptions+=mBT<CR>
map -builtin <silent> ;G :set guioptions-=mBT<CR>
map -builtin <silent> ;b :toolbartoggle Bookmarks Toolbar<CR>
map -builtin <silent> ;y :set showtabline=always<CR>
map -builtin <silent> ;u :set showtabline=never<CR>
" jj as esc
cmap jj <Esc>
imap jj <Esc>
tmap jj <Esc>
" }}}2
" }}}
" QuickMarks {{{1
silent qmark m https://mail.google.com/
silent qmark g https://github.com/
silent qmark t https://twitter.com/
silent qmark f http://fm.douban.com/
silent qmark d http://diigo.com/
silent qmark y http://www.youku.com/
silent qmark j http://dict.hjenglish.com/jp/
silent qmark w file:///sun/wikipad/index.html
silent qmark r https://www.rememberthemilk.com/home/s5unty/
silent qmark o http://ioffice.fnst.cn.fujitsu.com/
silent qmark i http://info.fnst.cn.fujitsu.com
silent qmark c http://campus.fnst.cn.fujitsu.com
silent qmark b http://ltech.fnst.cn.fujitsu.com/tsd
silent qmark B http://kaeru.fnst.cn.fujitsu.com/bbs
silent qmark l http://10.167.225.205/
silent qmark 1 http://10.167.225.189/wiki/index.php/PRIMECLUSTER
" }}}
" AutoProxy {{{2
" 切换 AutoProxy 的代理模式:智能、全局、禁用
map <silent> <F9> :set! extensions.autoproxy.proxyMode=global<CR>:echo ':('<CR>
map <silent> <F10> :set! extensions.autoproxy.proxyMode=disabled<CR>:echo ':D'<CR>
map <silent> <F12> :set! extensions.autoproxy.proxyMode=auto<CR>:echo ':)'<CR>
" Translate {{{2
map L :set ds=l<CR>P:set ds=google<CR>
map J :set ds=j<CR>P:set ds=google<CR>
" diigo {{{2
"" HTTPS has been supported by Diigo Toolbar.
"" So, hacks listed below is no necessary any more.
" map <silent> A :diigomark<CR>
" map <silent> ! :diigo<CR>
"
" command! diigo :open javascript:(function(){s=document.createElement("script");s.type="text/javascript";s.src="https://www.diigo.com/javascripts/webtoolbar/diigolet_b_h_b.js";document.body.appendChild(s);})();
" command! diigomark :open javascript:javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;var%20desc%20=%20(window.getSelection%20?%20window.getSelection().toString()%20:%20document.getSelection%20?%20document.getSelection()%20%20:%20document.selection.createRange().text);window.open('https://www.diigo.com/post?url='%20+%20encodeURIComponent(url)%20+%20'&title='%20+%20encodeURIComponent(title)%20+%20'&desc='%20+%20encodeURIComponent(desc)+'&client=simplelet#main','_blank','menubar=no,height=580,width=608,toolbar=no,scrollbars=no,status=no');})();
" command! -nargs=* diigosearch :tabopen https://www.diigo.com/user/s5unty/<args>