-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathideavimrc
66 lines (55 loc) · 2.15 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
" JP Addison's Intellij IDEAVim integration settings
" This is set up to mirror the keybindings found in spacemacs
" The space key is used as the leader key, with most commands being <Space><key><key>
" Note that unlike the other Intellij files in this repo, this one must be symlinked to ~/.ideavimrc
""" Basics
set surround
set clipboard+=unnamed
" Disable bell (there is no visualbell implemented
:set visualbell
" nnoremap only works in normal mode and means that / is not recursively called by other mappings
" TODO Maybe not
" nnoremap / :action Find<cr>
" Copy until the end of the line
" From beloglazov vimrc
noremap Y y$
" Only respect case if search has a capital letter
set ignorecase
set smartcase
""" Spacemacs emulation
let mapleader = " "
" TODO What is this used for?
let g:mapleader = " "
:let maplocalleader = ","
" map <leader><key><key> to actions, similar to Spacemacs style
" List of actions here: https://gist.github.com/zchee/9c78f91cc5ad771c1f5d
map <leader>bu :action ReopenClosedTab<cr>
" This doesn't work on blocks
map <leader>cl :action CommentByLineComment<cr>
map <leader>fs :w!<cr>
map <leader>fr :source ~/.ideavimrc<cr>
map <leader>fR :action RenameFile<cr>
map <leader>ff :action NewFile<cr>
map <leader>gg :action GotoDeclaration<cr>
map <leader>gG :action GotoTypeDeclaration<cr>
map <leader>gs :action CheckinFiles<cr>
map <leader>gb :action Back<cr>
map <leader>gf :action Forward<cr>
" TODO Might not be used
map <leader>hh :action HideActiveWindow<cr>
map <leader>pf :action GotoFile<cr>
map <leader>pg :action FindInPath<cr>
map <leader>rf :action ReformatCode<cr>
map <leader>rr :action Run<cr>
map <leader>rs :action SurroundWith<cr>
map <leader>rt :action Refactorings.QuickListPopupAction<cr>
map <leader>sl :action NextSplitter<cr>
" Back a splitter (dependent on having three splitters)
map <leader>sk :action NextSplitter<cr> :action NextSplitter<cr>
" Back a splitter (when you only have two and still try to use sk out of force of habit)
" map <leader>sk :action NextSplitter<cr>
map <leader>sh :action SplitHorizontally<cr>
map <leader>sv :action SplitVertically<cr>
" TODO rename file
""" Notes
" Terminal show/hide (option fn f12)