-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
executable file
·131 lines (107 loc) · 3.12 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
let mapleader=" "
""" Plugins --------------------------------
set surround
set which-key
" set multiple-cursors
" set commentary
" set argtextobj
" set easymotion
" set textobj-entire
" set ReplaceWithRegister
" set exchange
set notimeout
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
Plug 'machakann/vim-highlightedyank'
Plug 'justinmk/vim-sneak'
""" Plugin settings -------------------------
let g:argtextobj_pairs="[:],(:),<:>"
let g:NERDTreeMapCloseDir="h"
let g:NERDTreeMapActivateNode="l"
" <C-n> seems to me as a better solution than <M-n>,
" but we should finally support vim-visual-multi because vim-multiple-cursors is deprecated now
map <C-n> <Plug>NextWholeOccurrence
""" Common settings -------------------------
set showmode
set so=5
set incsearch
set number
set relativenumber
set ignorecase
set clipboard=none
""" Idea specific settings ------------------
set ideajoin
"set ideastatusicon=gray
set NERDTree
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" map <leader>f <Plug>(easymotion-s)
"" map <leader>e <Plug>(easymotion-f)
"" use 'Track Action Id' to set action
map gk <Action>(QuickJavaDoc)
map gc <Action>(CommentByLineComment)
nmap <Leader>nr :source ~/.ideavimrc<CR>:echo "IdeaVim reloaded!"<CR>
map <leader>dq <Action>(Flutter.Toolbar.ReloadAction)
map <leader>dr <Action>(Debug)
map <leader>ds <Action>(Stop)
map <leader>y "+y
map <leader>rn <Action>(RenameElement)
map <leader>zc <Action>(ToggleDistractionFreeMode)
map <leader>w :q <CR>
map <leader><leader> <Action>(Switcher)
map <leader>e <Action>(SelectInProjectView)
map <leader>f <Action>(ReformatCode)
map <leader><tab> <Action>(RecentFiles)
map <leader>sa <Action>(GotoAction)
map <leader>sg <Action>(FindInPath)
map <leader>st <Action>(FileStructurePopup)
map <leader>se <Action>(SearchEverywhere)
map <leader>sf <Action>(GotoFile)
map <leader>gh <Action>(Vcs.ShowTabbedFileHistory)
map <S-Space> <Action>(GotoNextError)
map <C-h> <C-w><C-h> <CR>
map <C-l> <C-w><C-l> <CR>
map <C-j> <C-w><C-j> <CR>
map <C-k> <C-w><C-k> <CR>
" Map Tab to switch to the next tab in normal mode
nnoremap <Tab> :tabnext<CR>
nnoremap <S-Tab> :tabprev<CR>
" Move line up/down
vmap <S-J> <Action>(MoveStatementDown)
vmap <S-K> <Action>(MoveStatementUp)
" Reformat the current line only
map <leader>l V<Action>(ReformatCode)
map <leader>b <Action>(ToggleLineBreakpoint)
map <leader>or <Action>(OverrideMethods)
" Don't use Ex mode, use Q for formatting.
map Q gq
" Just makes me nervous
map H h
" nmap s :<CR>
" From GUI settings
sethandler <C-2> a:ide
sethandler <C-S-2> a:ide
sethandler <C-6> a:ide
sethandler <C-S-6> a:ide
sethandler <C-A> a:ide
sethandler <C-B> a:vim
sethandler <C-C> a:ide
sethandler <C-D> a:vim
sethandler <C-E> a:ide
sethandler <C-F> a:ide
sethandler <C-G> a:ide
sethandler <C-H> a:vim
sethandler <C-I> a:ide
sethandler <C-J> a:ide
sethandler <C-K> a:ide
sethandler <C-L> a:vim
sethandler <C-N> a:vim
sethandler <A-N> a:ide
sethandler <C-O> a:vim
sethandler <C-Q> a:ide
sethandler <C-R> a:vim
sethandler <C-T> a:vim
sethandler <C-U> a:vim
sethandler <C-V> a:vim
sethandler <C-W> a:vim
sethandler <C-X> a:ide
sethandler <C-\> a:ideset
clipboard^=ideaput