-
Notifications
You must be signed in to change notification settings - Fork 0
/
ideavimrc
109 lines (80 loc) · 2.84 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
" Source your .vimrc
" source ~/.vimrc
" leader
map <space> <Nop>
let mapleader = " "
set notimeout
"" Base Settings
"" =============
set incsearch
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Don't use Ex mode, use Q for formatting.
map Q gq
"" Plugin Settings
"" ===============
set nerdtree
set quickscope
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
set which-key
let g:WhichKey_FontSize = 14
let g:WhichKey_PrefixColor = "#a403fe"
let g:WhichKey_CommandColor = "#01ffff"
let g:WhichKey_PrefixStyle = "bold"
let g:WhichKey_KeyStyle = "italic"
let g:WhichKey_SortOrder = "by_key_prefix_first"
let g:WhichKey_ShowTypedSequence = "false"
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'
"" Key Mappings
"" ============
:map s <Action>(flash.search)
:map <leader>e :NERDTreeToggle<CR>
let g:WhichKeyDesc_buffers = "<leader>b Buffers"
:map <leader>bd <Action>(CloseContent)
:map <leader>bo <Action>(CloseAllEditorsButActive)
:map <leader>bp <Action>(PinActiveEditorTab)
:map <leader>bP <Action>(CloseAllUnpinnedEditors)
:map [b <Action>(PreviousTab)
:map ]b <Action>(NextTab)
:map <S-h> <Action>(PreviousTab)
:map <S-l> <Action>(NextTab)
:map [e <Action>(GotoPreviousError)
:map ]e <Action>(GotoNextError)
:map <leader><bar> <Action>(SplitVertically)
:map <leader>- <Action>(SplitHorizontally)
let g:WhichKeyDesc_test = "<leader>t Test/Run"
:map <leader>tr <Action>(RunClass)
:map <leader>tl <Action>(Rerun)
:map <leader>tS <Action>(Stop)
let g:WhichKeyDesc_code = "<leader>c Code"
:map <leader>cr <Action>(RenameElement)
:map <leader>cf <Action>(ReformatCode)
:map <leader>ca <Action>(ShowIntentionActions)
let g:WhichKeyDesc_files = "<leader>f Files"
:map <leader><space> <Action>(GotoFile)
:map <leader>ff <Action>(GotoFile)
:map <leader>fr <Action>(RecentFiles)
let g:WhichKeyDesc_search = "<leader>s Search"
:map <leader>sg <Action>(TextSearchAction)
:map <leader>ss <Action>(GotoSymbol)
let g:WhichKeyDesc_debug = "<leader>d Debug"
:map <leader>db <Action>(ToggleLineBreakpoint)
let g:WhichKeyDesc_git = "<leader>g Git"
:map <leader>gf <Action>(Vcs.ShowTabbedFileHistory)
let g:WhichKeyDesc_git_hunk = "<leader>gh Git hunk"
:map <leader>ghr <Action>(Vcs.RollbackChangedLines)
:map <leader>ghR <Action>(ChangesView.Revert)
" Pane navigation
nnoremap <C-h> <C-w>h
nnoremap <C-l> <C-w>l
nnoremap <C-k> <C-w>k
nnoremap <C-j> <C-w>j