-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
executable file
·151 lines (120 loc) · 3.35 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
"" Source your .vimrc
"source ~/.vimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
" set scrolloff=5
" Do incremental searching.
" set incsearch
" Don't use Ex mode, use Q for formatting.
" map Q gq
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
" Find more examples here: https://jb.gg/share-ideavimrc
""" User configuration
""" Set leader key ------------------------------
let mapleader=" "
map <space> <nop>
""" Plugins
set surround
set easymotion
" set multiple-cursors
" use the native multicursor function instead
set commentary
set argtextobj
set exchange
set highlightedyank
" set which-key
""" Plugin settings -----------------------------
""" argtextobj: the functionality of argtextobj to other brackets
let g:argtextobj_pairs="[:],(:),<:>"
""" vim-highlightedyank: optimize highlight duration
let g:highlightedyank_highligh_duration = "3000"
""" multicursor
" let g:multi_cursor_next_key='<C-n>'
" let g:multi_cursor_prev_key='<C-p>'
" let g:multi_cursor_skip_key='<C-x>'
" let g:multi_cursor_quit_key='<C-q>'
""" Common settings -----------------------------
set number
set relativenumber
set timeoutlen=1000
set showmode
set so=8
set ignorecase
set hlsearch
set incsearch
set autoindent
set cindent
set nu
""" IDEA specific settings
set ideajoin
set ideastatusicon=gray
""" Use jj to exit insert/visual mode
imap jj <Esc>
""" Set H/L to ^/$
map H ^
map L $
vmap H ^
vmap L $
""" Set <C-u>/<C-d> to 9k/9j
map <C-u> 9k
vmap <C-u> 9k
map <C-d> 9j
vmap <C-d> 9j
""" set U to redo
map U <C-R>
""" Keymappings --------------------------------
map <leader>o <Action>(RecentProjectListGroup)
map <leader>nh :nohl<Cr>
""" Easymotion
map <leader>hf <Plug>(easymotion-s)v
map <leader>he <Plug>(easymotion-f)v
"" Multiple cursors
" map <C-n> <Plug>(multicursor-ms/)
" xmap <C-n> <Plug>(multicursor-ms/)
" map <C-x> <Plug>(RemoveOccurrence)
" xmap <C-x> <Plug>(RemoveOccurrence)
" map <C-q> <Plug>(SkipOccurence)
" xmap <C-q> <Plug>(SkipOccurence)
" map <S-C-n> <Plug>(AllWholeOccurrence)
" xmap <S-C-n> <Plug>(AllWholeOccurrence)
map <leader>rn <Action>(RenameElement)
map <leader>r <Action>(Run)
map <leader>d <Action>(Debug)
map <leader>c <Action>(Stop)
map <leader>z <Action>(ToggleDistractionFreeMode)
map <leader>s <Action>(SelectInProjectView)
map <leader>a <Action>(Annotate)
map <leader>h <Action>(Vcs.ShowTabbedFileHistory)
map [d <Action>(GotoPreviousError)
map ]d <Action>(GotoNextError)
map gb <Action>(JumpToLastChange)
map gd <Action>(GotoDeclaration)
map gi <Action>(GotoImplementation)
map gs <Action>(GotoSuperMethod)
map gu <Action>(ShowUsages)
map gh <Action>(Back)
map gl <Action>(Forward)
" Reformat the current line
map <leader>fl V<Action>(ReformatCode)V
map <leader>ff <Action>(ReformatCode)
map <leader>b <Action>(ToggleLineBreakpoint)
map <leader>e <Action>(FileStructurePopup)
" Change tabs
map <A-h> gT
map <A-l> gt
""" Screen Management --------------------------
set splitright
set splitbelow
map <leader>\ <C-w>v
map <leader>- <C-w>s
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l