-
Notifications
You must be signed in to change notification settings - Fork 9
/
.ideavimrc
107 lines (93 loc) · 3.5 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
" :actionlist shows all actions
set clipboard+=unnamed
set surround
set commentary
nnoremap Y y$
nnoremap 0 ^
vnoremap 0 ^
nnoremap ^ 0
vnoremap ^ 0
nnoremap <C-l> zz
noremap <ESC> :action CloseActiveTab<CR><ESC>
noremap <C-m> <CR>
" ---------------
" Visual
" ---------------
set showmatch " Show matching brackets.
set matchtime=2 " How many tenths of a second to blink
" Show invisible characters
set list
set listchars=""
" make tabs visible
set listchars=tab:▸▸
" show trailing spaces as dots
set listchars+=trail:•
" The character to show in the last column when wrap is off and the line
" continues beyond the right of the screen
set listchars+=extends:>
" The character to show in the last column when wrap is off and the line
" continues beyond the right of the screen
set listchars+=precedes:<
" ---------------
" Window Movement
" ---------------
nnoremap <silent> <A-h> :WriteBufferIfNecessary<CR>:wincmd h<CR>
nnoremap <silent> <A-j> :WriteBufferIfNecessary<CR>:wincmd j<CR>
nnoremap <silent> <A-k> :WriteBufferIfNecessary<CR>:wincmd k<CR>
nnoremap <silent> <A-l> :WriteBufferIfNecessary<CR>:wincmd l<CR>
inoremap <silent> <C-d> <delete>
inoremap <silent> <A-k> <C-o>:action EditorDeleteToLineEnd<CR>
inoremap <silent> <C-u> <C-o>:action EditorDeleteToLineStart<CR>
inoremap <silent> <A-d> <C-o>:action EditorDeleteToWordEnd<CR>
inoremap <silent> <A-BS> <C-o>:action EditorDeleteToWordStart<CR>
inoremap <silent> <A-b> <C-o>:action EditorPreviousWord<CR>
inoremap <silent> <A-f> <C-o>:action EditorNextWord<CR>
inoremap <silent> <C-f> <right>
inoremap <silent> <C-b> <left>
inoremap <silent> <C-e> <C-o>:action EditorLineEnd<CR>
inoremap <silent> <C-a> <C-o>:action EditorLineStart<CR>
inoremap <silent> <A-i> <C-o>:action InsertLiveTemplate<CR>
noremap <silent> <A-w> :action CloseContent<CR>
noremap <silent> <A-i> :action Generate<CR>
noremap <silent> <Space><Space> :action GotoAction<CR>
noremap <silent> <Space>r :source ~/.ideavimrc<CR>
noremap <silent> go :action GotoClass<CR>
noremap <silent> gf :action GotoFile<CR>
noremap <silent> <Space>d :action QuickJavaDoc<CR>
noremap <silent> <Space>o :action FileStructurePopup<CR>
noremap <silent> gr :action CallHierarchy<CR>
noremap <silent> <C-s> :action SearchEverywhere<cr>
noremap <silent> <Space>b :action ToggleLineBreakpoint<cr>
noremap <silent> <Space>, :action RecentFiles<cr>
noremap <silent> <Space>. :action GotoFile<cr>
noremap <silent> gd :action GotoDeclaration<cr>
noremap <silent> gi :action GotoImplementation<cr>
noremap <silent> gt :action TypeHierarchy<cr>
nmap <silent> gl <Plug>(CommentLine)
vmap <silent> gl gc
nnoremap <C-i> :action Forward<cr>
nnoremap <C-o> :action Back<cr>
nnoremap <C-.> :action NextTab<cr>
nnoremap <C-,> :action PreviousTab<cr>
nnoremap <A-.> :action GotoNextError<cr>
nnoremap <A-,> :action GotoPreviousError<cr>
nnoremap <C-S-f> :action ReformatCode<cr>
vnoremap <C-S-f> :action ReformatCode<cr>
nnoremap <silent> ,v v:action EditorSelectWord<CR>
vnoremap <silent> v :action EditorSelectWord<CR>
" 4 Window Splits
"
" -----------------
" g1 | g2 | g3 | g4
" -----------------
nnoremap <silent> g1 :WriteBufferIfNecessary<CR>:wincmd t<CR>
nnoremap <silent> g2 :WriteBufferIfNecessary<CR>:wincmd t<bar>:wincmd l<CR>
nnoremap <silent> g3 :WriteBufferIfNecessary<CR>:wincmd t<bar>:wincmd l<bar>
\:wincmd l<CR>
nnoremap <silent> g4 :WriteBufferIfNecessary<CR>:wincmd b<CR>
" Previous Window
nnoremap <silent> gp :wincmd p<CR>
" Equal Size Windows
nnoremap <silent> g= :wincmd =<CR>
" Swap Windows
nnoremap <silent> gx :wincmd x<CR>