-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
103 lines (86 loc) · 2.08 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
syntax on
filetype plugin on
set list
set smartindent
set noexpandtab
set tabstop=4
set shiftwidth=4
set nowrap
set cursorline
set noerrorbells
set showmode
set encoding=UTF-8
set nu
set smartcase
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile
set incsearch
set hls
set showcmd
set relativenumber
set ignorecase
set background=dark
let mapleader = " "
" easier beginning and end of line
nnoremap L $
nnoremap H ^
" Copy till the end of line
nnoremap Y y$
" Exit insert mode
inoremap jk <esc>
inoremap kj <esc>
" ===============
" INTELLIJ STUFF
" ===============
" G-o to ...
nmap gi :action GotoImplementation<CR>
nmap gr :action FindUsages<CR>
nmap gs :action GotoSuperMethod<CR>
" A-ction
nmap <leader>ar :action RenameElement<CR>
nmap <leader>af :action ReformatCode<CR>
nmap <leader>ai :action Inline<CR>
nmap <leader>ax :action HideActiveWindow<CR>
nmap <leader>as :action SelectInProjectView<CR>
nmap <leader>ag :action Generate<CR>
" E-xtract
map <leader>ea :action IntroduceActionsGroup<CR>
map <leader>ep :action IntroduceParameter<CR>
map <leader>ev :action IntroduceVariable<CR>
map <leader>ec :action IntroduceConstant<CR>
map <leader>ef :action ExtractFunction<CR>
map <leader>em :action ExtractMethod<CR>
" W-indow
:map <leader>wq <Action>(HideActiveWindow)
:map <leader>wp <Action>(ActivateProjectToolWindow)
:map <leader>wg <Action>(ActivateVersionControlToolWindow)
:map <leader>wl <Action>(ActivateLogcatToolWindow)
:map <leader>wt <Action>(ActivateTerminalToolWindow)
:map <leader>b :action ShowTypeBookmarks<CR>
" GG-it
:map <leader>ggh <Action>(Vcs.ShowTabbedFileHistory)
:map <leader>ggl <Action>(Vcs.UpdateProject)
:map <leader>ggc <Action>(ActivateCommitToolWindow)
:map <leader>ggm <Action>(Git.ResolveConflicts)
set ideajoin
set ideamarks
set easymotion
set clipboard+=unnamed
set clipboard+=unnamedplus
" system clipboard
vmap <leader>y "+y
vmap <leader>d "+d
nmap <leader>y "+yy
nmap <leader>p "+p
nmap <leader>P "+P
vmap <leader>p "+p
vmap <leader>P "+P
" Quick copy-paste
" Copy
vmap <C-Space> "ay
nmap <C-c> "ayiw
" Paste
nmap <C-Space> "aP
imap <C-Space> <C-o>"ap