-
Notifications
You must be signed in to change notification settings - Fork 0
/
ideavimrc
100 lines (96 loc) · 2.98 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
" full list of actions https://gist.github.com/zchee/9c78f91cc5ad771c1f5d
let mapleader=","
set rnu
set noerrorbells " no beeps
let mapleader = "\"
set clipboard+=unnamed
set surround
set multiple-cursors
set hls
set scrolloff=0
map <leader>r :action ReformatCode<CR>
map gu :action Vcs.RollbackChangedLines<CR>
map <leader>fu :action FindUsages<CR>
map gr :action FindUsages<CR>
map <leader>ho :action OpenFile<CR>
map <leader>hh :action :RecentFiles<CR>
map <leader>e :action ReloadFromDisk<CR>
map <leader>te :action Terminal.OpenInTerminal<CR>
map <leader>rn :action RenameElement<CR>
"todo figure out how to get this to execute as
let @f='ds)dT<space>'
nnoremap <silent> csf [(cb
map <C-x>x :action MoveEditorToOppositeTabGroup<CR>
imap <C-n> <ESC>:action HippieCompletion<CR>a
imap <C-p> <ESC>:action HippieBackwardCompletion<CR>a
imap <C-i> <Esc>
vmap <C-i> <Esc>
"" this should be standardized
map gj :action VcsShowNextChangeMarker<CR>
map gk :action VcsShowPrevChangeMarker<CR>
map gn :action VcsShowNextChangeMarker<CR>
map gp :action VcsShowPrevChangeMarker<CR>
sethandler <c-h> a:vim
sethandler <c-l> a:vim
sethandler <c-j> a:vim
sethandler <c-k> a:vim
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
imap jj <Esc>
map <leader>nn :noh<CR>
" leader mappings
map <leader>cl :action CloseProject<CR>
map <C-x><C-j> :action GotoNextError<CR>
map <C-x><C-k> :action GotoPreviousError<CR>
map <leader>tl :tabclose<CR>
map <C-c> :close<CR>
"save
map <leader>ss :w<CR>
nnoremap <Space> i<Space><Esc>
#nnoremap <Tab> a<Space><Esc>
s\noremap <leader>y ggVGy''
nnoremap <leader>sa :wa<CR>
nnoremap <leader>s :save<CR>
nmap <leader>o o<Esc>
nmap <leader>O O<Esc>
map <leader>zz :q!<CR>
nmap zz :q!<CR>
map <leader>tl :close<CR>
map <leader>rr :source ~/.ideavimrc<CR>
map <leader>re :e ~/.ideavimrc<CR>
map <leader>le :e ~/.zshrc<CR>
"map ideavim comment like vim
"so my macro will work in both places
map gc :action CommentByLineComment<CR>
map gb :action CommentByBlockComment<CR>
"tabs
noremap <left> gT
nnoremap <right> gt
imap <i-j> <Esc>
vmap <i-j> <Esc>
set nu
nnoremap <leader>t :action Terminal.OpenInTerminal<CR>
nnoremap Q :tabclose<CR>
"Map common used global vim letter bookmarks to Intellij number bookmarks
nnoremap mA :action ToggleBookmark0<CR>
nnoremap mB :action ToggleBookmark1<CR>
nnoremap mC :action ToggleBookmark2<CR>
nnoremap mD :action ToggleBookmark3<CR>
nnoremap mE :action ToggleBookmark4<CR>
nnoremap mF :action ToggleBookmark5<CR>
nnoremap mG :action ToggleBookmark6<CR>
nnoremap mH :action ToggleBookmark7<CR>
nnoremap mI :action ToggleBookmark8<CR>
nnoremap mJ :action ToggleBookmark9<CR>
nnoremap 'A :action GotoBookmark0<CR>
nnoremap 'B :action GotoBookmark1<CR>
nnoremap 'C :action GotoBookmark2<CR>
nnoremap 'D :action GotoBookmark3<CR>
nnoremap 'E :action GotoBookmark4<CR>
nnoremap 'F :action GotoBookmark5<CR>
nnoremap 'G :action GotoBookmark6<CR>
nnoremap 'H :action GotoBookmark7<CR>
nnoremap 'I :action GotoBookmark8<CR>
nnoremap 'J :action GotoBookmark9<CR>