-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ideavimrc
60 lines (47 loc) · 1.58 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
set visualbell
set noerrorbells
set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
set ideajoin
" Integrate with system clipboard
set clipboard=unnamedplus,unnamed
let mapleader = "\"
imap ,. <Esc>
vmap ,. <Esc>
" Use Q for formatting the current paragraph (or visual selection)
vmap Q gq
nmap Q gqap
" nmap gqq :action com.andrewbrookins.idea.wrap.WrapAction<CR>
" vmap gq :action com.andrewbrookins.idea.wrap.WrapAction<CR>
" These create newlines like o and O but stay in normal mode
nmap zj o<Esc>k
nmap zk O<Esc>j
" key bindings for quickly moving between windows
" h left, l right, k up, j down
nmap <leader>h <c-w>h
nmap <leader>l <c-w>l
nmap <leader>k <c-w>k
nmap <leader>j <c-w>j
" Zoom in/out without the nonsense of using the actions menu
nmap <leader>zz :action EditorDecreaseFontSize<cr>
nmap <leader>zx :action EditorIncreaseFontSize<cr>
nmap <leader>g :action GotoDeclaration<cr>
nmap <leader>b :action Back<cr>
nmap <leader>f :action Forward<cr>
nmap <leader>t :action GotoFile<cr>
nmap <leader>c :action GotoClass<cr>
nmap <leader>ns :action GotoSymbol<cr>
nmap <leader>nm :action FileStructurePopup<cr>
nmap <leader>d :action ShowErrorDescription<cr>
nmap == :action ReformatCode<cr>
" Switches between .cc and .h file!
nmap <leader>s :action GotoRelated<cr>
" IdeaVim uses 'a' for alt instead of Vim's 'm'
nmap <a-j> 15gj
nmap <a-k> 15gk
" Won't work in visual mode (with vmap) for some reason.
" Use default map of <c-/> for that.
nmap gcc :action CommentByLineComment<cr>
nmap ,cs :action CommentByBlockComment<cr>
set clipboard+=ideaput