-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.ideavimrc
More file actions
95 lines (75 loc) · 2.28 KB
/
.ideavimrc
File metadata and controls
95 lines (75 loc) · 2.28 KB
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
let mapleader = " "
set ttyfast
set scrolloff=10
" i think defaults
set linenumber
set showmode
set showcmd
set nocompatible
set ignorecase
set smartcase
" highlight searches
set hlsearch
set incsearch
" visual mode: Ctrl + c = copy to system clipboard
vnoremap <C-C> "+y
" D = Ctrl
" M = Alt
nmap <C-f> :action EditorPageUp<CR>
nmap <C-b> :action EditorPageUp<CR>
" https://stackoverflow.com/a/78982421
" let Ctrl+V paste from clipboard in insert mode
" sort of slow
inoremap <C-V> <Esc>"*pa
" leader to select tabs
map <leader>1 <Action>(GoToTab1)
map <leader>2 <Action>(GoToTab2)
map <leader>3 <Action>(GoToTab3)
map <leader>4 <Action>(GoToTab4)
map <leader>5 <Action>(GoToTab5)
map <leader>6 <Action>(GoToTab6)
map <leader>7 <Action>(GoToTab7)
map <leader>8 <Action>(GoToTab8)
map <leader>9 <Action>(GoToTab9)
map <leader>0 <Action>(GoToLastTab)
" re-impl of mini.move using editors in-built indentation mechanism
" https://github.com/echasnovski/mini.move
map <M-j> <Action>(MoveStatementDown)
map <M-k> <Action>(MoveStatementUp)
"map <M-h> <
"map <M-l> >
map <M-h> <Action>(EditorUnindentSelection)
map <M-l> <Action>(EditorIndentSelection)
" close current tab
map <leader>c <Action>(CloseContent)
map <C-p> <Action>(GotoFile)
" hover function signature
map gh <Action>(QuickJavaDoc)
map grd <Action>(GotoDeclaration)
" there is no equivalent in intellj, this does both declaration and usages
map grr <Action>(GotoDeclaration)
map grn <Action>(RenameElement)
map gt <Action>(GotoTypeDeclaration)
map gu <Action>(GotoTest)
"map <A-p> <Action>(GotoFile)
map <D-p> <Action>(GotoFile)
map <M-p> <Action>(GotoFile)
map <Alt-f> <Action>(FindInPath)
map <Alt-p> <Action>(GotoFile)
map gc <Action>(CommentByLineComment)
map gcc <Action>(CommentByLineComment)
map <leader>v :vsplit<CR>
nnoremap <leader>cf :action ReformatCode<CR>
nmap <Leader>rf :action Refactorings.QuickListPopupAction<CR>
nmap <Leader>rt :action RunClass<CR>
nmap <Leader>fb :action RecentFiles<CR>
imap <C-n> <ESC>:action HippieCompletion<CR>a
imap <C-p> <ESC>:action HippieBackwardCompletion<CR>a
imap <C-y> <ESC>:action EditorChooseLookupItem<CR>a
" clear highlights on search when pressing enter
nnoremap <Esc> :nohlsearch<CR>
" file browser
set nerdtree
map \\ :NERDTreeToggle<CR>
" make yank highlighted
Plug 'machakann/vim-highlightedyank'