-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathideavimrc
More file actions
58 lines (48 loc) · 1.21 KB
/
Copy pathideavimrc
File metadata and controls
58 lines (48 loc) · 1.21 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
let mapleader=' '
" Plugins
set surround
set which-key
" set commentary
set NERDTree
" Settings
set showmode
set showcmd
set number
set numberwidth=4
set matchpairs
set ignorecase
set smartcase
set scrolloff=10
set hlsearch
set incsearch
set gdefault
set history=1000
set undolevels=1000
set visualbell
set noerrorbells
set startofline
set notimeout
set clipboard+=unnamed
set clipboard+=ideaput
" Keybindings
" Navigation
nnoremap <leader>ci :action GotoImplementation<CR>
nnoremap <leader>cd :action GotoDeclaration<CR>
nnoremap <leader>ct :action GotoTest<CR>
" Better navigation on panes
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l
" Clears the search register
" There's an issue with hlsearch where it persists across restart
" https://youtrack.jetbrains.com/issue/VIM-2879/Dont-persist-search-highlighting-using-hlsearch-when-restart-the-IDE
nnoremap <leader>/ :nohlsearch<CR>
" Refactoring
map <leader>cr <Action>(Refactorings.QuickListPopupAction)
map <leader>= <Action>(ReformatCode)
map <leader>co <Action>(OptimizeImports)
" Config
nnoremap <leader>ve :e ~/.ideavimrc<CR>
nnoremap <leader>vs :action IdeaVim.ReloadVimRc.reload<CR>
imap <A-\> <Action>(copilot.requestCompletions)