" You can find a list of commands here: https://jb.gg/h38q75 " Find more examples here: https://jb.gg/share-ideavimrc " Examples to map IDE actions to IdeaVim -- https://jb.gg/abva4t " Enable IdeaVim plugins https://jb.gg/ideavim-plugins " FIX: Macros does NOT work " TODO: Add Jetbrains shortcut-config-file to dotfiles repo " TODO: Add shortcuts for opening/closing `za` " Resolve Shortcut conflicts with Jetbrains sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:ide sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:ide sethandler a:vim sethandler a:ide sethandler a:vim sethandler a:ide sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim sethandler a:vim """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" source ~/.vim/configs.vim source ~/.vim/key_maps.vim source ~/.vim/plugin_config.vim " Common settings "set clipboard^=unnamed,unnamedplus,ideaput " Copy to and from system clipboard set showmode set idearefactormode=keep """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Enabled plugins set commentary " gc [motion] set easymotion " j set exchange " cx[motion] 2 times, cxc <- cancel exchange set highlightedyank " set indent-object " ai, ii, aI, iI <- Select indent set quickscope set paragraph-motion set matchit set multiple-cursors set nerdtree " e set repeat set surround " ys or cs or ds [motion] set textobj-entire " yae, cae, dae <- operates on entire file set ReplaceWithRegister " IdeaVIM specific plugins set argtextobj " vaa, caa, daa <- Works on function args let g:argtextobj_pairs="[:],(:),<:>" set ideajoin set ideamarks " m[A-Z] <- sets marks """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""" SHORTCUTS """"""""""""""""""""""""" " Easy Motion map j (easymotion-s) " Multiple Cursors nmap NextWholeOccurrence xmap NextWholeOccurrence nmap g NextOccurrence xmap g NextOccurrence xmap SkipOccurrence xmap RemoveOccurrence " NerdTree """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" nnoremap e :NERDTreeToggle " When in the tree use the below default keybindings " j, k - To go down and up " p - Go to the parent directory " P - Go the root directory " s - open file in vertical split " i - open in horizontal split " t - open in a new tab " o - Open the selected file or Expand the selected directory. " - Also collapse the same directory. " - Moves the cursor to the file. " go - Opens the file but keeps the cursor on the file tree " A - expand the file tree " x - close the file tree " File Navigation """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" nnoremap ls :action Switcher nnoremap :action GotoFile nnoremap :action ActivateTerminalToolWindow " Code Navigation, Formatting, Others """"""""""""""""""""""""""""""""""""""" nnoremap ]] :action GotoNextElementUnderCaretUsage nnoremap [[ :action GotoPrevElementUnderCaretUsage nnoremap ]f :action MethodDown nnoremap [f :action MethodUp nmap :action Back nmap :action Forward nnoremap cS :action GotoSymbol noremap v :action FileStructurePopup map == V(ReformatCode) nnoremap cr :action RenameElement nnoremap ca :action ShowIntentionActions nnoremap cR :action FindUsages map (ReformatCode) \| (SaveAll) " Diagnostics """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" nnoremap dd :action ActivateProblemsViewToolWindow nnoremap dw :action InspectCode nnoremap ]d :action GotoNextError nnoremap [d :action GotoPreviousError " Git """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" nnoremap gg :action ActivateCommitToolWindow nnoremap gr :action Vcs.RollbackChangedLines nnoremap gb :action Git.Branches nnoremap gG :action ActivateVersionControlToolWindow nnoremap ga :action Annotate nnoremap gf :action ShowTabbedFileHistory nnoremap ]g :action VcsShowNextChangeMarker nnoremap [g :action VcsShowPrevChangeMarker " List stuff """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" nnoremap lt :action ActivateTODOToolWindow nnoremap lb :action RecentFiles nnoremap lc :action RecentLocations " Search stuff """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" nnoremap sg :action FindInPath nnoremap sb :action TextSearchAction nnoremap sc :action GotoClass " Close stuff """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" nnoremap xo :action CloseAllEditorsButActive nnoremap z :action ToggleDistractionFreeMode nnoremap / :nohlsearch " Run, debug & test """"""""""""""""""""""""""""""""""""""""""""""""""""""""" map rd :action Debug map rx :action Run map rs :action Stop map rt :action RunTests map rb :action ToggleLineBreakpoint " Split window nnoremap m :action MoveEditorToOppositeTabGroup nnoremap x :action Unsplit