diff --git a/.ideavimrc b/.ideavimrc index ccb7cce..0781ddd 100644 --- a/.ideavimrc +++ b/.ideavimrc @@ -1,40 +1,111 @@ -" .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 - - -"" -- Suggested options -- -" 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 - -" Do incremental searching. +set number relativenumber +set ideajoin +set linenumber +set showmode +set showcmd set incsearch +set hlsearch +set scrolloff=10 +set visualbell +set ignorecase +set smartcase +set notimeout +set clipboard+=unnamed -" Don't use Ex mode, use Q for formatting. -map Q gq +" 3rd party +set which-key +set surround +set highlightedyank -" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins +" Which Key +let g:WhichKey_FontSize = 16 +let g:WhichKey_CommandColor = "#41ead4" +let g:WhichKey_PrefixColor = "#f335b2" +let g:WhichKey_SortOrder = "by_key_prefix_first" -" Highlight copied text -Plug 'machakann/vim-highlightedyank' -" Commentary plugin -Plug 'tpope/vim-commentary' +" NerdTree +plug 'preservim/nerdtree' +set NerdTree +nnoremap :NerdTree +let g:NerdTreeWinSize = 30 +let g:NerdTreeMapPreview = 0 +let g:NerdTreeActivateNode = 'l' +let g:NERDTreeMapJumpParent = 'h' -"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t -"" Map \r to the Reformat Code action -"map \r (ReformatCode) +let mapleader=' ' -"" Map d to start debug -"map d (Debug) +noremap lr :action ExtractMethod -"" Map \b to toggle the breakpoint on the current line -"map \b (ToggleLineBreakpoint) -" -" -" -set NERDTree -let g:NERDTreeMapActivateNode='l' -let g:NERDTreeMapJumpParent='h' +" Manage Projects +noremap s :action ManageRecentProjects + +" Tab Navigation +noremap :action NextTab +noremap :action PreviousTab + +" Pane Navigation +noremap h +noremap l +noremap k +noremap j + +" File Navigation +map ff (GoToFile) +map (RecentFiles) +map fl (RecentLocations) +map fs (NewScratchFile) + +" Center Screen with Page up and down +nnoremap zz +nnoremap zz + +" Window Management +map % (SplitVertically) +map " (SplitHorizontally) +map x (CloseContent) + +" Popup Navigation +inoremap (PopupMenu-selectNext) +inoremap (PopupMenu-selectPrev) + +" Debug options +map dd (Debug) +map db (ToggleLineBreakpoint) + +" Actions +map am (ShowIntentionActions) +map as (SearchEverywhere) + +" Refactoring +map rn (RenameElement) +map re (ExtractMethod) +map rv (IntroduceVariable) +map rf (IntroduceField) +map rs (ChangeSignature) +map rr (Refactorings.QuickListPopupAction) + +" Go To Code +map gd (GoToDeclaration) +map gy (GotoTypeDeclaraton) +map gi (GotoImplementation) +map gu (ShowUsages) +map gt (GotoTest) +map gf (Back) +map gb (Forward) + +" Go Tag +map gt :action IntentionActionAsAction_com.goide.inspections.tag.GoTagAddKeyIntention + +" Errors +map en (ReSharperGotoNextErrorInSolution) +map ep (ReSharperGotoPrevErrorInSolution) + +" Menu +map mm (MainMenu) +map my (GotoTypeDeclaraton) +map mi (GotoImplementation) +map mu (ShowUsages) +map mt (GotoTest) +map mf (Back) +map mb (Forward)