-
Notifications
You must be signed in to change notification settings - Fork 0
/
ideavimrc
66 lines (53 loc) · 2.05 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
" Find more examples here: https://jb.gg/share-ideavimrc
set nu
set relativenumber
set hlsearch " highlight search occurrences
set ignorecase " ignore case in search patterns
set smartcase " no ignore case when pattern is uppercase
set incsearch " show search results while typing
set wrapscan " searches wrap around the end of the file
set gdefault " substitute all occurrences in line per default
set history=10000 " keep x lines of command line history
set scrolloff=5 sidescrolloff=10 " keep some lines before and after the cursor visible
set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard
set ideajoin
" set <leader> to <space>
let mapleader = " "
set easymotion
set sneak
" Don't use Ex mode, use Q for formatting.
map Q gq
nnoremap \e :e ~/.ideavimrc<CR>
nnoremap \r :action IdeaVim.ReloadVimRc.reload<CR>
map <leader>d <Action>(Debug)
map <leader>a <Action>(GotoAction)
map <leader>f <Action>(GotoFile)
map <leader>g <Action>(FindInPath)
map <leader>b <Action>(Switcher)
map <leader>o <Action>(OptimizeImports)
map <leader>l <Action>(ReformatCode)
map <leader>t <Action>(Terminal.OpenInTerminal)
map <leader>r <Action>(RenameElement)
map <leader>R <Action>(Refactorings.QuickListPopupAction)
map <leader>s <Action>(SelectInProjectView)
map <leader>h <Action>(Vcs.ShowTabbedFileHistory)
map <TAB> <Action>(NextTab)
map <s-TAB> <Action>(PreviousTab)
map <C-n> :noh<CR>
map <C-u> <C-u>zz
map <C-d> <C-d>zz
" Toggle relative line numbers
map <leader><leader>l :set nornu<CR>
map <leader><leader>L :set rnu<CR>
" Error Diagnostics
map <leader>x :bd<CR>
map <leader>xo <Action>(CloseAllEditorsButActive)
" Error Diagnostics
nnoremap ge :action GotoNextError<CR>
nnoremap gE :action GotoPreviousError<CR>
" Running & Debugging
nnoremap ,r :action ContextRun<CR>
nnoremap ,c :action RunClass<CR>
nnoremap ,f :action ChooseRunConfiguration<CR>
nnoremap ,t :action ActivateRunToolWindow<CR>
nnoremap ,u :action Rerun<CR>