-
Notifications
You must be signed in to change notification settings - Fork 9
/
ideavimrc
134 lines (103 loc) · 3.33 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
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
"*********************************************************************
" ideavimrc
"*********************************************************************
set NERDTree
set surround
" Enable IdeaVim-sneak plugin
set sneak
" Enable join via the IDE
set ideajoin
" Change mapleader
let mapleader = ' '
let maplocalleader = ','
" Use the OS clipboard by default
set clipboard=unnamed,unnamedplus
" Enable native idea paste action for put operations
set clipboard+=ideaput
" Ignore case of searches
set ignorecase
" When searching try to be smart about cases
set smartcase
" Show the current mode
set showmode
" Enable line numbers
set number
" Highlight dynamically as pattern is typed
set incsearch
" Use relative line numbers
set relativenumber
nnoremap Y y$
cnoremap <C-a> <Home>
cnoremap <C-e> <End>
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
cnoremap <C-d> <Del>
cnoremap <C-n> <Down>
cnoremap <C-p> <Up>
inoremap <C-a> <Home>
inoremap <C-e> <End>
inoremap <C-b> <Left>
inoremap <C-f> <Right>
inoremap <C-d> <Del>
inoremap <C-n> <Down>
inoremap <C-p> <Up>
nmap <C-k> <Action>(GotoPreviousError)
nmap <C-j> <Action>(GotoNextError)
nmap <C-i> <action>(Forward)
nmap <C-o> <action>(Back)
nmap <Leader>1 <Action>(GoToTab1)
nmap <Leader>2 <Action>(GoToTab2)
nmap <Leader>3 <Action>(GoToTab3)
nmap <Leader>4 <Action>(GoToTab4)
nmap <Leader>5 <Action>(GoToTab5)
nmap <Leader>6 <Action>(GoToTab6)
nmap <Leader>7 <Action>(GoToTab7)
nmap <Leader>8 <Action>(GoToTab8)
nmap <Leader>9 <Action>(GoToTab9)
nmap <Leader>- <Action>(PreviousTab)
nmap <Leader>+ <Action>(NextTab)
nmap [b <Action>(PreviousTab)
nmap ]b <Action>(NextTab)
nmap [t <Action>(PreviousTab)
nmap ]t <Action>(NextTab)
nmap <Leader><Tab> <Action>(GotoAction)
xmap <Leader><Tab> <Action>(GotoAction)
omap <Leader><Tab> <Action>(GotoAction)
nmap <Leader>= <Action>(ReformatCode)
nmap <Leader>: <Action>(RunAnything)
nmap <Leader>bb <Action>(RecentFiles)
nmap <Leader>bd <Action>(CloseContent)
nmap <Leader>bh <Action>(Vcs.ShowTabbedFileHistory)
vmap <Leader>bh <Action>(Vcs.ShowHistoryForBlock)
nmap <Leader>bo <Action>(CloseAllEditorsButActive)
nmap <Leader>bw <Action>(CloseEditor)
nmap <Leader>c<Space> <Action>(CommentByLineComment)
vmap <Leader>c<Space> <Action>(CommentByLineComment)
nmap <Leader>ff <Action>(GotoFile)
nmap <Leader>fh <Action>(RecentFiles)
nmap <Leader>fs <Action>(RecentChangedFiles)
nmap <Leader>gb <Action>(Annotate)
nmap <Leader>gd <Action>(Compare.LastVersion)
nmap <Leader>gf <Action>(Git.Fetch)
nmap <Leader>gg <Action>(GotoFile)
nmap <Leader>gm <Action>(Git.Merge)
nmap <Leader>gl <Action>(Git.Pull)
nmap <Leader>gs <Action>(ActivateVersionControlToolWindow)
nmap <Leader>gv <Action>(LocalHistory.ShowHistory)
nmap <Leader>jd <Action>(GotoDeclarationOnly)
nmap <Leader>ji <Action>(GotoImplementation)
nmap <Leader>jj <Action>(GotoImplementation)
nmap <Leader>jr <Action>(ShowUsages)
nmap <Leader>js <Action>(GotoSuperMethod)
nmap <Leader>jt <Action>(GotoTypeDeclaration)
nmap <Leader>sa <Action>(FindInPath)
nmap <Leader>sg <Action>(FindInPath)
nmap <Leader>sr <Action>(FindInPath)
nmap <Leader>tt <Action>(ActivateStructureToolWindow)
nmap <Leader>yf <Action>(CopyPaths)
nmap <Leader>yn <Action>(CopyReference)
nmap ,K <Action>(QuickJavaDoc)
nmap ,k <Action>(ExpressionTypeInfo)
nnoremap <Leader>nj :NERDTreeFind<CR>
nnoremap <Leader>nn :NERDTreeFocus<CR>
nnoremap <Leader>tn :NERDTreeToggle<CR>