-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_ideavimrc
71 lines (54 loc) · 1.4 KB
/
dot_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
"###普通配置
let g:mapleader="\<Space>"
set tabstop=4
set softtabstop=4
set autoindent
set hidden
"syntax on
"set NERDTree
set nu
set relativenumber
inoremap <expr> <Tab>
set clipboard+=unnamed
set clipboard-=ideaput
sethandler <C-o> i:ide n:vim
sethandler <C-i> i:ide n:vim
sethandler <C-v> i:ide n:vim
sethandler <C-r> i:ide n:vim
"c-[在ide中被设置为esc
sethandler <C-[> a:ide
sethandler <C-/> a:ide
"sethandler <C-n> a:vim
sethandler <C-h> i:vim n:ide
sethandler <C-l> i:vim n:ide
"sethandler <C-j> i:vim n:ide
"sethandler <C-k> i:vim n:ide
inoremap <C-h> <Home>
inoremap <C-l> <End>
nnoremap <leader>bn :bnext<CR>
nnoremap <leader>bp :bpre<CR>
nnoremap <leader>bd :bdelete<CR>
map <leader>cp <Action>(ParameterInfo)
map <leader>i <Action>(ShowErrorDescription)
"imap <C-j> <Action>(ParameterInfo)
"inoremap <C-k> <Action>(ShowErrorDescription)
"自动切换输入法(IdeaVimExtension)
set keep-english-in-normal
set keep-english-in-normal-and-restore-in-insert
"重构
map <leader>rn <Action>(RenameElement)
"注释
map cc <Action>(CommentByLineComment)
"格式化
map <leader>fo <Action>(ReformatCode)
map <leader>t <Action>(ActivateStructureToolWindow) "结构
"nnoremap <C-n> :NERDTree<CR>
if has('ide')
if &ide =~? 'intellij idea'
if &ide =~? 'community'
elseif &ide =~? 'ultimate'
endif
elseif &ide =~? 'pycharm'
map <leader>cr <Action>(ExecuteInPyConsoleAction)
endif
endif