-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
121 lines (103 loc) · 3.78 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
let mapleader=" "
" Editing
nnoremap s
nnoremap S
nnoremap <silent> <leader>c :actionlist
" Source navigation
noremap gr :action FindUsages<CR>
noremap gl :action uk.co.ben_gibson.git.link.UI.Action.Menu.MenuAction.Clipboard<CR>
" Refactoring
noremap <leader>rr :action RefactoringMenu<CR>
noremap <leader>rn :action RenameElement<CR>
noremap <leader>rm :action ExtractMethod<CR>
vnoremap <leader>rs :action EditorSortLines<CR>
" Operations
noremap <leader>tr :action Run<CR>
noremap <leader>tR :action RunClass<CR>
noremap <leader>td :action Debug<CR>
noremap <leader>tD :action DebugClass<CR>
" Move lines
nnoremap <A-j> :m .+1<CR>==
nnoremap <A-k> :m .-2<CR>==
inoremap <A-j> <Esc>:m .+1<CR>==gi
inoremap <A-k> <Esc>:m .-2<CR>==gi
vnoremap <A-j> :m '>+1<CR>gv=gv
vnoremap <A-k> :m '<-2<CR>gv=gv
"" Split
noremap <Leader>h :<C-u>split<CR>
noremap <Leader>v :<C-u>vsplit<CR>
inoremap <S-Left> <C-O>:action EditorLeftWithSelection<CR> inoremap <S-Right> <C-O>:action EditorRightWithSelection<CR> inoremap <S-Up> <C-O>:action EditorUpWithSelection<CR> inoremap <S-Down> <C-O>:action EditorDownWithSelection<CR> "set clipboard+=unnamed set keymodel+=startsel
" File Management
nnoremap <leader>fs :action ReformatCode<CR> :w<CR>
nnoremap <leader>fy :action CopyAbsolutePath<CR>
nnoremap <leader>fm :action FileMenu<CR>
" Ace Jump / Easymotion
nmap <leader>jj <Plug>(easymotion-s)
" Window Management
nnoremap <leader>w/ :vsplit<CR>
nnoremap <leader>w% :vsplit<CR>
nnoremap <leader>ws :split<CR>
nnoremap <leader>w" :split<CR>
nnoremap <leader>wd :q<CR>
nnoremap <leader>wm :action Unsplit<CR>
nnoremap <leader>zm :action ToggleZenMode<CR>
nnoremap <leader>tz :action ToggleZenMode<CR>
nnoremap <leader>tl :action EditorToggleShowLineNumbers<CR>
nmap <leader>w <C-w>
" Project Management
nnoremap <leader>pf :action GotoFile<CR>
nnoremap <leader>pa :action SearchEverywhere<CR>
nnoremap <leader>ps :action FindInPath<CR>
nnoremap <leader>pm :action ProjectViewPopupMenu<CR>
nnoremap <leader>pp :action RecentProjectListGroup<CR>
nnoremap <leader>pc :action CloseProject<CR>
" Buffer Management
nnoremap <leader>bX :action NewScratchBuffer<CR>
nnoremap <leader>bd :q<CR>
nnoremap <leader>bO :action CloseAllEditorsButActive<CR>
nnoremap gw :action CloseEditor<CR>
nnoremap gq :action CloseActiveTab<CR>
nnoremap <leader>sw :action EditorToggleUseSoftWraps<CR>
nnoremap <leader>gnc :action VcsShowNextChangeMarker<CR>
nnoremap <leader>gpc :action VcsShowPrevChangeMarker<CR>
nnoremap <leader>gnm :action MethodDown<CR>
nnoremap <leader>gpm :action MethodUp<CR>
nnoremap <leader>ch :action CallHierarchy<CR>
" Multiple Cursors
map <C-N> <A-N>
map <C-P> <A-P>
map <C-Q> <A-X>
map g<C-N> g<A-N>
" Source Control
nnoremap <leader>gg :action CheckinProject<CR>
nnoremap <leader>gco :action Git.Branches<CR>
nnoremap <leader>gf :action Git.Fetch<CR>
nnoremap <leader>gF :action Git.Pull<CR>
nnoremap <leader>gp :action Vcs.Push<CR>
nnoremap <leader>ga :action Annotate<CR>
nnoremap <leader>gcb :action Git.CompareWithBranch<CR>
vnoremap <leader>lh :action LocalHistory.ShowHistory<CR>
nnoremap <leader>lh :action LocalHistory.ShowHistory<CR>
nnoremap <leader>grc :action Git.ResolveConflicts<CR>
" diff
nnoremap ,A :action Diff.AppendLeftSide<CR>
nnoremap ,B :action Diff.AppendRightSide<CR>
nnoremap ,a :action Diff.ApplyLeftSide<CR>
nnoremap ,r :action Diff.ApplyNonConflicts<CR>
nnoremap ,b :action Diff.ApplyRightSide<CR>
nnoremap ,j :action NextDiff<CR>
nnoremap ,J :action Diff.NextConflict<CR>
nnoremap ,k :action PreviousDiff<CR>
nnoremap ,K :action Diff.PreviousConflict<CR>
" IdeavimManagement
nnoremap <leader>fp :e ~/.ideavimrc<CR>
noremap <leader>hr :source ~/.ideavimrc<CR>
nnoremap <leader>al :actionlist<CR>
nnoremap <A-x> :
set relativenumber
set showmode
set multiple-cursors
set ideajoin
set easymotion
set highlightedyank
set idearefactormode