/
ideavimrc
103 lines (98 loc) · 2.16 KB
/
ideavimrc
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
set visualbell
set noerrorbells
set showtabline=2
set laststatus=2
set guitablabel=%t
set ignorecase smartcase
set smarttab
set wrap
set whichwrap+=l,h
set number
set history=50
set autoread
syntax enable
set incsearch
set hlsearch
highlight Search guibg='yellow' guifg='none'
set nobackup
set copyindent
set winaltkeys=no
set autoindent
set shiftwidth=2 tabstop=2 expandtab
set softtabstop=2
"set backspace=4
set ruler
set showcmd
set ignorecase
"在输入括号时光标会短暂地跳到与之相匹配的括号处,不影响输入
""set cursorcolumn " 高亮光标列
set cursorline " 高亮光标行
set cursorcolumn
set showmatch
set showmode
set matchtime=5
filetype plugin indent on
map <F5> <Esc>gg=G<C-o>
map <F6> <Esc>:tabedit<Enter>
map \p <Esc>"*p<Enter>k$a
map \y <Esc>"*y<Enter>
vmap \y "+y<Enter>
vmap <C-c> "+y<Enter>
map <F1> <Esc>:Gstatus<Enter>
map \w <Esc>:w<Enter>
map <C-s> <Esc>:w<Enter>
imap <C-s> <Esc>:w<Enter>a
map <F2> <Esc>:Gcommit<Enter>
imap <C-x><C-s> <Esc>:w<Enter>a
imap <C-b> <Esc>i
"imap <C-c> <Esc>
imap <C-l> <Esc>zza
imap <C-z> <Esc>ui
imap <C-r> <Esc><C-r>i
map <C-z> <Esc>u
imap <C-n> <Down>
imap <C-f> <Esc>la
imap <C-p> <Up>
imap <C-e> <Esc>$a
imap <C-a> <Esc>0i
imap <C-d> <Esc>lxi
imap <C-k> <Esc>ld$a
imap <C-z> <Esc>ua
imap <A-d> <Esc>ldwi
imap <A-Backspace> <Esc>ldbi
imap <A-f> <Esc>lwi
"nerdtree
imap <f3> <esc>:NERDTreeToggle<enter>
map <f3> <esc>:NERDTreeToggle<enter>
""""IndentGuidesToggle
imap <f7> <esc>:IndentGuidesToggle<enter>
map <f7> <esc>:IndentGuidesToggle<enter>
""tagbar
nmap <F8> :TagbarToggle<CR>
imap <F8> :TagbarToggle<CR>
""""
set fileencodings=utf-8,cp932
map <A-x> <Esc>:set filetype=
map <S-F5> :source ~/.vimrc<Enter>
"翻标签
map <C-Tab> <Esc>gt
map <C-S-Tab> <Esc>gT
imap <C-Tab> <Esc>gt
imap <C-S-Tab> <Esc>gT
vmap <C-Tab> <Esc>gt
vmap <C-S-Tab> <Esc>gT
map H <Esc>gT
map L <Esc>gt
"快捷插入各种编程括号
"""
"命令行下也绑定emacs按键
cnoremap <C-e> <END>
cnoremap <C-a> <HOME>
cnoremap <C-f> <Right>
cnoremap <C-b> <Left>
" non github repos
"Bundle 'git://git.wincent.com/command-t.git'
" ...
set surround
filetype plugin indent on " required!
nmap <leader><leader>w :action AceAction<CR>