Last active
April 20, 2024 14:47
-
-
Save Walcriz/c1df0858d988f69662544427536b496e to your computer and use it in GitHub Desktop.
Ideavim configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" General settings | |
set scrolloff=15 | |
set belloff=all | |
set clipboard+=unnamedplus | |
set ignorecase | |
set smartcase | |
set incsearch | |
" Built in plugins | |
set nerdtree | |
" Keymaps | |
let mapleader = " " | |
" Make use of built in undo instead of ideavim one | |
nmap u <action>($Undo) | |
vmap u <action>($Undo) | |
nmap <C-o> <action>(Back) | |
nmap <C-i> <action>(Forward) | |
" File navigation | |
nmap ff <action>(GotoClass) | |
nmap fn <action>(GotoFile) | |
nmap <leader>fr <action>(RecentFiles) | |
nmap fg <action>(FindInPath) | |
nmap <leader>fl <action>(RecentLocations) | |
nmap <leader>ff :action SearchEverywhere<CR> | |
" Open NERDTree (use q to exit) | |
nmap <leader>tt :NERDTreeToggle<CR> | |
" Refactoring | |
nmap rr <Action>(RenameElement) | |
nmap <leader>rm <Action>(ExtractMethod) | |
nmap <leader>rv <Action>(IntroduceVariable) | |
nmap <leader>rf <Action>(IntroduceField) | |
nmap <leader>rs <Action>(ChangeSignature) | |
nmap <leader>rr <Action>(ShowIntentionActions) | |
" Go to code | |
nmap gd <Action>(GotoDeclaration) | |
nmap gy <Action>(GotoTypeDeclaration) | |
nmap gi <Action>(GotoImplementation) | |
nmap gu <Action>(ShowUsages) | |
nmap gt <Action>(GotoTest) | |
nmap gf <Action>(Back) | |
nmap gb <Action>(Forward) | |
nmap K <Action>(QuickJavaDoc) | |
" Git windows | |
nmap <leader>gc <Action>(CheckinProject) | |
nmap <leader>gs <Action>(ActivateVersionControlToolWindow) | |
nmap <leader>gb <Action>(Git.Branches) | |
" Folding | |
nmap zc :action CollapseAllRegions<CR> | |
nmap zo :action ExpandAllRegions<CR> | |
" Comment lines | |
nmap gc <action>(CommentByLineComment) | |
vmap gc <action>(CommentByLineComment)<ESC> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment