-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimperatorrc
91 lines (74 loc) · 2.1 KB
/
vimperatorrc
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
" 3.8 (created: 2013/08/26 20:00:29)
source! ~/.vimperatorrc.local
" Bindings {{{
let g:mapleader=","
nnoremap ; :
map A <Nop>
map <C-q> <Nop>
noremap j 3j
noremap k 3k
noremap J <C-d>
noremap K <C-u>
noremap < g0
noremap > g$
noremap y Y
noremap Y y
inoremap <C-f> <Right>
inoremap <C-b> <Left>
inoremap <A-d> <C-t>dwi
" Insert模式下使用<C-n>/<C-p>翻页
imap <C-n> <Esc>:tabnext<CR>
imap <C-p> <Esc>:tabprev<CR>
" 移动标签页
noremap <A-m> :tabmove<SPACE>
noremap <A-Left> :tabmove! -1<CR>
noremap <A-Right> :tabmove! +1<CR>
" 打开关闭侧边拦
noremap s :sidebar<SPACE>
noremap S :sbclose<CR>
"}}}
" UI {{{
" colors pgray
set history=10000
set noerrorbells
set maxitems=6
let g:hintsio="io"
set newtab=all
set complete=sl
set tabnumbers=true
set focuscontent
set noscrollbars
" set editor=gvim -f
" set toolbars=noaddons,nobookmarks,nomenu,nonavigation,tabs
set toolbars=noaddons,nobookmarks,nomenu,navigation,tabs
set status=input,location,tabcount,position
set hintchars="hjklasdfgyuiopqwertnmzxcvb"
" Show destination links in
" 1=status line
" 2=command line
" 0=none (FF4 baloon)
set showstatuslinks=0
"}}}
" Search {{{
set incsearch
set ignorecase
set hlsearch
set smartcase
nnoremap <leader>nh :nohlsearch<cr>
"}}}
" surround com and net可以直接先输入网站名,再用<CTRL>+<ENTER>快捷输入.com/.net {{{
cnoremap<S-Return> <End>.org<Home><C-Right>www.<CR>
cnoremap<C-Return> <End>.com<Home><C-Right>www.<CR>
"}}}
"上一页和下一页 {{{
set nextpattern=\s*下一页|下一张|下一篇|下页|后页\s*,^\bnext\b,\\bnext\\b,^>$,^(>>|?)$,^(>|?),(>|?)$,\\bmore\\b
set previouspattern=\s*上一页|上一张|上一篇|上页|前页\s*,^\bprev|previous\b,\\bprev|previous\\b,^<$,^(<<|?)$,^(<|?),(<|?)$
"}}}
" 自定义打开网址 {{{
noremap <leader>q :tabopen http://web.qq.com/<CR>
noremap <leader>b :tabopen butbueatiful.blog.chinaunix.net<CR>
noremap <leader>m :tabopen http://dillinger.io/<CR>
"}}}
" 自定义命令 {{{
:command! -nargs=+ -description="Translates the given argument from Chinese to English" translate tabopen http://translate.google.com/#zh|en|<args>
"}}}