-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ideavimrc
108 lines (78 loc) · 2.07 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
let mapleader=","
"" Basic Settings
"" ========================================================
set scrolloff=7
set number relativenumber
set showmode showcmd
"" Search stuff
set magic
set ignorecase
set smartcase
set hlsearch
set incsearch
"" Misc
set visualbell
set clipboard+=unnamedplus
"" Let h and l switch lines if used at beginning/end of a line.
set whichwrap+=<,>,h,l
"" Allow jumping between matching angular brackets
set matchpairs+=<:>
"" Plugins
"" ========================================================
set which-key
set surround
set highlightedyank
set nerdtree
set highlightedyank
set commentary
" Easymotion settings
set easymotion
set notimeout
"" Keymaps
"" ========================================================
" open NERDTree
map <leader>x :NERDTreeToggle<CR>
" inoremap <C-q> <Esc>
nnoremap <S-tab> <Esc>
nmap <S-tab> <Esc>
" disable highlighting (but keep last search)
nmap <leader><space> :nohl<CR>
" highlight all occurrences of word under cursor using search
nnoremap <space> #<C-o>
" faster scrolling
map <C-k> 3k
map <C-j> 3j
nmap W wi
nmap E ea
nmap B bi
" fast (global) search/replace
nmap <leader>sr :%s/
nmap <leader>gsr :%s//g<Left><Left>
vmap <leader>sr :s/
vmap <leader>gsr :s//g<Left><Left>
map <A-l> <C-W>l
map <A-j> <C-W>j
map <A-k> <C-W>k
map <A-h> <C-W>h
imap <C-q> <Esc>
"" Idea action shortcuts
"" ========================================================
" code navigation
nmap <leader>gd <action>(GotoDeclaration)
nmap <leader>gy <action>(GotoTypeDeclaration)
nmap <leader>gi <action>(GotoImplementation)
nmap <leader>gu <action>(ShowUsages)
nmap <leader>gt <action>(GotoTest)
nmap <leader>gf <action>(Forward)
nmap <leader>gb <action>(Back)
" misc
map <C-e> <action>(CommentByLineComment)
nmap <leader>m <action>(Run)
nmap <leader>M <action>(Stop)
nmap <leader>bu <action>(CompileDirty)
map <leader>br <action>(ToggleLineBreakpoint)
nmap <leader>l <action>(NextTab)
nmap <leader>h <action>(PreviousTab)
nmap <leader>tws :keeppatterns %s/\s\+$//g<Enter>
nmap <leader>pom :e pom.xml<Enter>
nmap <leader>prop :e application.properties<Enter>