Repository navigation
Expand file tree
/
Copy pathideavimrc
More file actions
120 lines (85 loc) · 3.56 KB
/
Copy pathideavimrc
File metadata and controls
120 lines (85 loc) · 3.56 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
" TODO: Sync these key bindings with nvim
" Set Space as your leader key
let mapleader=" "
" Status & Overview
nnoremap <leader>gs :action Vcs.Operations.Popup<CR>
nnoremap <leader>gg :action ActivateVersionControlToolWindow<CR>
" Branching & Syncing
nnoremap <leader>gb :action Git.Branches<CR>
nnoremap <leader>gf :action Git.Fetch<CR>
nnoremap <leader>gl :action Git.Pull<CR>
nnoremap <leader>gp :action Vcs.Push<CR>
" Note: Setup update in git config settings first
nnoremap <leader>gu :action Vcs.UpdateProject<CR>
nnoremap <leader>gn :action Git.CreateNewBranch<CR>
nnoremap <leader>gR :action Github.Create.Pull.Request<CR>
nnoremap <leader>gw :action Github.Open.In.Browser<CR>
" Merging & Rebasing
nnoremap <leader>gm :action Git.Merge<CR>
nnoremap <leader>gr :action Git.Rebase<CR>
" History & Diffs
nnoremap <leader>gh :action Vcs.Show.Log<CR>
nnoremap <leader>gd :action Vcs.Diff<CR>
nnoremap <leader>gL :action Vcs.ShowTabbedFileHistory<CR>
" --- Quick Fixes & Errors ---
" Jump to next/previous error (like ]d and [d in modern Neovim)
nnoremap ]d :action GotoNextError<CR>
nnoremap [d :action GotoPreviousError<CR>
" Open the 'Lightbulb' menu (Intention Actions)
nnoremap <leader>ca :action ShowIntentionActions<CR>
" View the full error description (Hover)
nnoremap K :action ShowErrorDescription<CR>
" Open the 'Problems' tool window
nnoremap <leader>xx :action ActivateProblemsViewToolWindow<CR>
" --- Interface Management ---
" Toggle the Project Explorer (Files)
nnoremap <leader>ee :action ActivateProjectToolWindow<CR>
" Toggle the Terminal
nnoremap <leader>tt :action ActivateTerminalToolWindow<CR>
" ESC to return to Editor from any Tool Window (Terminal, Project, etc.)
nnoremap <Esc> <C-\><C-n>:action HideActiveWindow<CR>
" Maximize/Restore current tab (Zen mode for your code)
nnoremap <leader>wm :action ToggleMaximizeEditor<CR>
" --- Projects ---
" Switch to the Next Project Window
nnoremap <Leader>pn :action NextProjectWindow<CR>
" Switch to the Previous Project Window
nnoremap <Leader>pp :action PreviousProjectWindow<CR>
" --- Search & Refactor ---
" Search Everywhere (The double-shift menu)
nnoremap <leader>ff :action SearchEverywhere<CR>
" Rename symbol (Variable, Class, Method)
nnoremap <leader>rn :action RenameElement<CR>
" Reformat code (Like Prettier/Auto-format)
nnoremap <leader>rf :action ReformatCode<CR>
" View Recent Files
nnoremap <leader>fo :action RecentFiles<CR>
" Open/Toggle the terminal with <Leader>t
nnoremap <Leader>t :action ActivateTerminalToolWindow<CR>
" --- Navigation Between Windows & Tabs ---
" Switch between editor splits like a Vim pro
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Split window vertically
nnoremap <C-w>v :action SplitVertically<CR>
" Split window horizontally
nnoremap <C-w>s :action SplitHorizontally<CR>
" Close the current split
nnoremap <C-w>c :action CloseEditor<CR>
" Unsplit (Close all other splits)
nnoremap <C-w>o :action UnsplitAll<CR>
" Move through editor tabs with H and L
nnoremap H :action PreviousTab<CR>
nnoremap L :action NextTab<CR>
" --- Search and Git Integration ---
" Search everywhere (Double-Shift equivalent)
nnoremap <Leader>s :action SearchEverywhere<CR>
" plugins
set commentary " Use 'gcc' to comment out lines or 'gc' for motions
set highlightedyank " Briefly highlight the text you just yanked (copied)
set ideajoin " Make Vim's 'J' smart (handles comments and code logic)
" NOTE: Which-key requires plugin installation in IDEA
set which-key " Shows a popup guide for your <leader> keys as you type
set timeoutlen=10000