-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
111 lines (89 loc) · 3.01 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
set number
set keep-english-in-normal
""" Leader
let mapleader="\<SPACE>"
""" Training
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
""" Editing
set clipboard+=unnamed
set clipboard+=ideaput
""" Distraction Free Mode
nnoremap <Leader>td :action ToggleDistractionFreeMode<CR>
""" Navigation
nnoremap <TAB> :action PreviousTab<CR>
nnoremap <s-TAB> :action NextTab<CR>
nnoremap <Leader>q :action CloseContent<CR>
nnoremap <Leader>\ :action MoveTabRight<CR>
nnoremap <Leader>= :action Unsplit<CR>
nnoremap <Leader>m :action MoveEditorToOppositeTabGroup<CR>
nnoremap <Leader>s :action Switcher<CR>
nnoremap <Leader>f :action RecentFiles<CR>
""" Find
set incsearch
nnoremap <Leader>fs :action FileStructurePopup<CR>
nnoremap <Leader>fu :action FindUsages<CR>
nnoremap <Leader>fp :action SelectInProjectView<CR>
nnoremap <Leader>gf :action GotoFile<CR>
nnoremap <Leader>gc :action GotoClass<CR>
nnoremap <Leader>gs :action GotoSymbol<CR>
nnoremap <Leader>gt :action GotoTest<CR>
nnoremap <Leader>ge :action GotoNextError<CR>
nnoremap <Leader>d :action GotoDeclaration<CR>
nnoremap <Leader>D :action GotoTypeDeclaration<CR>
nnoremap <Leader>l :action JumpToLastChange<CR>
nnoremap <Leader>h :action HighlightUsagesInFile<CR>
nnoremap <Leader>gb :action Git.Branches<CR>
nnoremap <Leader>gh :action Vcs.ShowHistoryForBlock<CR>
nnoremap <Leader>gv :action Vcs.QuickListPopupAction<CR>
nnoremap <Leader>ga :action Annotate<CR>
nnoremap <Leader>gd :action Github.Pull.Request.Review.In.Editor.Toggle<CR>
nnoremap <Leader>gp :action Github.Pull.Request.Show.In.Toolwindow<CR>
""" Editing
set ideajoin
set idearefactormode=keep
set scrolloff=5
nnoremap [ :action MethodUp<CR>
nnoremap ] :action MethodDown<CR>
nnoremap <C-o> :action Back<CR>
nnoremap <C-i> :action Forward<CR>
nnoremap <Leader>r :action Refactorings.QuickListPopupAction<CR>
nnoremap <Leader>p :action ReformatCode<CR>
nnoremap <Leader>o :action ShowIntentionActions<CR>
nnoremap <Leader>w :action SaveAll<CR>
nnoremap <Leader>cr :action CopyReference<CR>
nnoremap <Leader>cg :action GitHub.Copy.Link<CR>
sethandler <C-j> a:vim
sethandler <C-k> a:vim
noremap <C-j> :action MoveLineDown<CR>
noremap <C-k> :action MoveLineUp<CR>
inoremap <C-p> <Up>
inoremap <C-n> <Down>
inoremap <C-b> <Left>
inoremap <C-f> <Right>
""" Bookmark
nnoremap <Leader>hl :action ShowBookmarks<CR>
nnoremap <Leader>ha :action ToggleBookmark<CR>
""" Plugins
Plug 'tpope/vim-surround'
Plug 'michaeljsmith/vim-indent-object'
Plug 'vim-scripts/argtextobj.vim'
Plug 'tpope/vim-commentary'
Plug 'vim-scripts/ReplaceWithRegister'
Plug 'machakann/vim-highlightedyank'
let g:highlightedyank_highlight_duration = 1500
Plug 'easymotion/vim-easymotion'
map f <Plug>(easymotion-fl)
map t <Plug>(easymotion-tl)
map F <Plug>(easymotion-Fl)
map T <Plug>(easymotion-Tl)
map s <Plug>(easymotion-s2)
let g:EasyMotion_enter_jump_first = 1
Plug 'terryma/vim-multiple-cursors'
map <C-g> <A-n>
map <C-h> <A-p>
Plug 'preservim/nerdtree'
map <Leader>t :NERDTree<CR>
nnoremap <Leader>e :action SelectInProjectView<CR>