-
Notifications
You must be signed in to change notification settings - Fork 1
/
.ideavimrc
156 lines (143 loc) · 3.97 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
" Plugins
set surround
set commentary
set argtextobj
set textobj-entire
set highlightedyank
set textobj-indent
set matchit
set quickscope
set exchange
set NERDTree
set ReplaceWithRegister
" Options
set showmode
set scrolloff=10
set number relativenumber
set incsearch
set ignorecase
set smartcase
" Mappings
let mapleader = "\<Space>"
nmap Y y$
nmap cy "+y
nmap cY "+Y
xmap Y "+y
xmap P "+p
nmap cp "+p
nmap cP "+P
nmap <C-j> o<Esc>
map! <M-j> <Down>
map! <M-k> <Up>
map <C-w><C-v> <C-w>v
map <C-w><C-c> <C-w>c
map <C-w><C-c> <C-w>c
" JetBrains specific
map <leader>dc <Action>(Debug)
map <leader>dq <Action>(Stop)
map ]e <Action>(GotoNextError)
map [e <Action>(GotoPreviousError)
map ]d <Action>(GotoNextError)
map [d <Action>(GotoPreviousError)
map ]d <Action>(NextParameter)
map [d <Action>(PrevParameter)
map gh <Action>(ShowHoverInfo)
map gr <Action>(ShowUsages)
map <leader>r <Action>(RenameElement)
map <M-w> <Action>(CloseContent)
map <C-=> <Action>(EditorIncreaseFontSize)
map <C--> <Action>(EditorDecreaseFontSize)
map <C-p> <Action>(GotoFile)
map <leader>a <Action>(ShowIntentionActions)
map <leader>e <Action>(ShowErrorDescription)
map gi <Action>(GotoImplementation)
map <leader>tr <Action>(RunClass)
map <leader>tR <Action>(ShowRecentTests)
map <leader>ts <Action>(GotoSymbol)
map <leader>/ <Action>(FindInPath)
map <leader>f <Action>(Find)
map <M-l> <Action>(NextTab)
map <M-h> <Action>(PreviousTab)
map <C-w>gd <C-w>v<Action>(GotoDeclaration)
map gD <Action>(GotoTypeDeclaration)
map <C-s> <Action>(SaveAll)
map <C-s> <Action>(SaveAll)
map <leader>bo <Action>(CloseAllEditorsButActive)
map <C-w>C <Action>(CloseActiveTab)
map <F11> <Action>(ToggleFullScreen)
map <M-S-+> <Action>(IncrementWindowWidth)
map <M-S--> <Action>(DecrementWindowWidth)
map <C-q> <Action>(CloseProject)
map gf <Action>(GotoFile)
map >aa <Action>(MoveElementRight)
map <aa <Action>(MoveElementLeft)
map <leader>dd <Action>(Debug)
map <leader>db <Action>(ToggleLineBreakpoint)
map <leader>dB <Action>(Debugger.RemoveAllBreakpointsInFile)
map <leader>dc <Action>(Resume)
map <leader>dC <Action>(RunToCursor)
map <leader>di <Action>(SmartStepInto)
map <leader>ds <Action>(StepOver)
map <leader>do <Action>(StepOut)
map <leader>dq <Action>(Stop)
map <M-1> <Action>(GoToTab1)
map <M-2> <Action>(GoToTab2)
map <M-3> <Action>(GoToTab3)
map <M-4> <Action>(GoToTab4)
map <M-5> <Action>(GoToTab5)
map <M-6> <Action>(GoToTab6)
map <M-7> <Action>(GoToTab7)
map <M-8> <Action>(GoToTab8)
map <M-9> <Action>(GotoLastTab)
imap <C-j> <Action>(EditorDown)
imap <C-k> <Action>(EditorUp)
imap <C-s> <Esc><Action>(SaveAll)
imap <M-p> <C-r>"
cmap <M-p> <C-r>"
imap <M-l> <Right>
imap <M-h> <Left>
imap <C-;> <Esc>m0A;<Esc>`0a
nmap <leader>cA A<Space>//<Space>
nmap <leader>co o//<Space>
nmap <leader>cO O//<Space>
nmap <leader>; m0A;<Esc>`0
nmap <leader>, m0A,<Esc>`0
map ]f ]m
map [f [m
" vim-surround
xmap s <Plug>VSurround
xmap S <Plug>VgSurround
nmap s ys
nmap S ys$
" commentary
nmap cm gcc
nmap <leader>c gc
xmap <leader>c gc
nmap <leader>C gc$
" vim-exchange
nmap sx <Plug>(Exchange)
xmap X <Plug>(Exchange)
nmap sxc <Plug>(ExchangeClear)
nmap sxx <Plug>(ExchangeLine)
" highlightedyank
let g:highlightedyank_highlight_duration = '150'
" vim-quickscope
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
let g:qs_primary_color = '#e06c75'
let g:qs_secondary_color = '#d19a66'
" NERDTree
nmap <leader><leader>` :NERDTreeToggle<CR>
nmap <leader>` :NERDTreeFocus<CR>
nmap <leader>~ :NERDTreeFind<CR>
let g:NERDTreeMapActivateNode = 'l'
let g:NERDTreeMapCloseDir = 'h'
let g:NERDTreeMapToggleZoom = 'F'
let g:NERDTreeMapOpenVSplit = '<C-v>'
" ReplaceWithRegister
nmap su <Plug>ReplaceWithRegisterOperator
xmap su <Plug>ReplaceWithRegisterVisual
nmap suu <Plug>ReplaceWithRegisterLine
nmap sU su$
nmap suc "+su
xmap sU "+su
unmap grr " Remove default mapping