-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathideavimrc
105 lines (73 loc) · 2.59 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
set ideajoin
set idearefactormode=keep
set visualbell
set noerrorbells
" tab switching
nmap H <action>(PreviousTab)
nmap L <action>(NextTab)
" sane Y
nmap Y y$
" paste and keep original register value
vnoremap gp pgvy
" use K to get type info for expression
vnoremap K :action ExpressionTypeInfo<CR>
let mapleader=" "
nmap \\ <leader>
vmap \\ <leader>
nnoremap <CR> :
vnoremap <CR> :
nnoremap <C-o> :action Back<CR>
nnoremap <C-i> :action Forward<CR>
nnoremap <leader>e :action GotoClass<CR>
vnoremap <leader>e :action GotoClass<CR>
nnoremap <leader>E :action GotoFile<CR>
vnoremap <leader>E :action GotoFile<CR>
nnoremap <leader>d :action GotoDeclaration<CR>
vnoremap <leader>d :action GotoDeclaration<CR>
nnoremap <leader>t :action GotoTypeDeclaration<CR>
vnoremap <leader>t :action GotoTypeDeclaration<CR>
nnoremap <leader>u :action FindUsages<CR>
vnoremap <leader>u :action FindUsages<CR>
" -- PLUGINISH --
" better %
packadd matchit
" helper for f/F/t/T
set quickscope
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
let g:qs_accepted_chars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
" s<obj>, S<obj>
Plug 'tpope/vim-surround'
nmap s <Plug>Ysurround
nmap S <Plug>YSurround
nmap ss <Plug>Yssurround
nmap Ss <Plug>YSsurround
nmap SS <Plug>YSsurround
" gc<obj>
Plug 'tpope/vim-commentary'
" gr<obj>
Plug 'vim-scripts/ReplaceWithRegister'
" cx<obj>, cxc to clear, X in visual
Plug 'tommcdo/vim-exchange'
" { and } treat all whitespace lines as empty too
Plug 'dbakker/vim-paragraph-motion'
" <op>ai, <op>ii, <op>aI, <op>iI
Plug 'michaeljsmith/vim-indent-object'
" <op>aa, <op>ia
Plug 'vim-scripts/argtextobj.vim'
" <op>ae, <op>ie
Plug 'kana/vim-textobj-entire'
" show yanked region visually
Plug 'machakann/vim-highlightedyank'
" -- CUSTOM THINGS --
nmap <leader>gm <Plug>(open-git-web-main)
nmap <leader>gb <Plug>(open-git-web-blame)
nmap <leader>gs <Plug>(open-git-web-sha)
vmap <leader>gm <Plug>(open-git-web-main)
vmap <leader>gb <Plug>(open-git-web-blame)
vmap <leader>gs <Plug>(open-git-web-sha)
nnoremap <Plug>(open-git-web-main) :GitWebMainOpenNormal
nnoremap <Plug>(open-git-web-blame) :GitWebBlameOpenNormal
nnoremap <Plug>(open-git-web-sha) :GitWebSHAOpenNormal
vnoremap <Plug>(open-git-web-main) :GitWebMainOpenVisual
vnoremap <Plug>(open-git-web-blame) :GitWebBlameOpenVisual
vnoremap <Plug>(open-git-web-sha) :GitWebSHAOpenVisual