Created
October 17, 2024 13:25
-
-
Save klowdo/d750bc41a66e7838c740f8e752d9d4ed to your computer and use it in GitHub Desktop.
My .ideavimrx
This file contains hidden or 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
| let mapleader=" " | |
| """ Plugins -------------------------------- | |
| set surround | |
| set multiple-cursors | |
| set commentary | |
| set argtextobj | |
| set easymotion | |
| set textobj-entire | |
| set ReplaceWithRegister | |
| set exchange | |
| """set clipboard+=unnamed | |
| set ignorecase | |
| set smartcase | |
| " Trying the new syntax | |
| Plug 'machakann/vim-highlightedyank' | |
| Plug 'justinmk/vim-sneak' | |
| """ nerdtree | |
| Plug 'preservim/nerdtree' | |
| " map <C-n> n :NERDTree<CR> | |
| map <leader>e :NERDTree<CR> | |
| """" harpoon | |
| Plug 'nvim-lua/plenary.nvim' " don't forget to add this one if you don't have it yet! | |
| " Plug 'ThePrimeagen/harpoon' | |
| """ Plugin settings ------------------------- | |
| let g:argtextobj_pairs="[:],(:),<:>, {:}" | |
| " <C-n> seems to me as a better solution than <M-n>, | |
| " but we should finally support vim-visual-multi because vim-multiple-cursors is deprecated now | |
| ""map <C-n> <Plug>NextWholeOccurrence | |
| """ Common settings ------------------------- | |
| set showmode | |
| set so=5 | |
| set incsearch | |
| set nu | |
| set relativenumber | |
| "" Idea specific settings ------------------ | |
| set ideajoin | |
| set ideastatusicon=gray | |
| """ My Mappings ----------------------------- | |
| ""map <leader>f <Plug>(easymotion-s) | |
| "map <leader>e <Plug>(easymotion-f) | |
| map <leader>d <Action>(Debug) | |
| map <leader>r <Action>(RenameElement) | |
| map <leader>c <Action>(Stop) | |
| map <leader>z <Action>(ToggleDistractionFreeMode) | |
| map <leader>s <Action>(SelectInProjectView) | |
| map <leader>a <Action>(Annotate) | |
| map <leader>h <Action>(Vcs.ShowTabbedFileHistory) | |
| map <S-Space> <Action>(GotoNextError) | |
| nmap g] :action GotoImplementation<CR> | |
| " Reformat the current line only | |
| map <leader>l V<Action>(ReformatCode) | |
| map <leader>b <Action>(ToggleLineBreakpoint) | |
| map <leader>o <Action>(FileStructurePopup) | |
| map <leader>J Ji <ESC> | |
| set which-key | |
| set sneak | |
| """ Navigation ----- | |
| nnoremap <leader>ff :action RecentFiles<CR> | |
| "symotion-s Just makes me nervous | |
| map H h | |
| " Toggle case and start typing. E.g. `<leader>iget`: `property` -> `getProperty` | |
| map <leader>i ~hi | |
| " Remove selection and toggle case. E.g. `v2l<leader>u`: `getProperty` -> `property` | |
| vmap <leader>u d~h | |
| " I think it's a better solution | |
| map U <C-R> | |
| " harpoonJ | |
| nmap <leader><C-h> :action SetHarpoon1<cr> | |
| nmap <leader><C-t> :action SetHarpoon2<cr> | |
| nmap <leader><C-n> :action SetHarpoon3<cr> | |
| nmap <leader><C-s> :action SetHarpoon4<cr> | |
| nmap <C-h> :action GotoHarpoon1<cr> | |
| nmap <C-t> :action GotoHarpoon2<cr> | |
| nmap <C-n> :action GotoHarpoon3<cr> | |
| nmap <C-s> :action GotoHarpoon4<cr> | |
| nmap <C-e> :action ShowHarpoon<cr> | |
| nmap <C-a> :action AddToHarpoon<cr> | |
| " test | |
| map rt :action RiderUnitTestRunContextAction<CR> | |
| """ IdeaVim actions | |
| nmap [[ <Action>(MethodUp) | |
| nmap ]] <Action>(MethodDown) | |
| " Highlight usages, use CMD+G/Shift+CMD+G to iterate | |
| nmap <leader>h <Action>(HighlightUsagesInFile) | |
| nmap <leader>n <Action>(ReSharperNavigateTo) | |
| nmap <leader>p <Action>(ParameterInfo) | |
| nmap <leader>q <Action>(ToggleRenderedDocPresentation) | |
| """nmap <leader>r <Action>(Refactorings.QuickListPopupAction) | |
| """xmap <leader>r <Action>(Refactorings.QuickListPopupAction) | |
| nmap <leader>s <Action>(ShowUsages) | |
| nmap <leader>t <Action>(TypeHierarchy) | |
| nmap <leader>u <Action>(FindUsages) | |
| nmap <leader>v <Action>(Vcs.QuickListPopupAction) | |
| nmap <Leader>w <action>(ActiveToolwindowGroup) | |
| nmap <leader>x <Action>(HideAllWindows) | |
| """ https://github.com/citizenmatt/dotfiles/blob/master/ideavimrc | |
| """ https://github.com/chylex/dotfiles | |
| " Tests | |
| map rt :action RiderUnitTestRunContextAction<CR> | |
| map rd :action RiderUnitTestDebugContextAction<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment