vim mode... 分享一个 idea 的配置
```
" ref: .ideavimrc
https://github.com/JetBrains/ideavim/discussions/303" ref:
https://github.com/JetBrains/ideavim/wiki/set-commands" base configuration
" :actionlist
set showmode
set incsearch
set hlsearch
set nu
set relativenumber
set ignorecase
set smartcase
set clipboard+=unnamed
" keymaps
" the leader key
let mapleader=" "
" redo
nnoremap U <C-r>
" zen-mode
nnoremap <C-z> :action ToggleDistractionFreeMode<CR>
" find
nnoremap <C-f> :action GotoFile<CR>
nnoremap <C-r> :action RecentFiles<CR>
" navigation
nnoremap J }
nnoremap K {
nnoremap sv :action SplitVertically<CR>
nnoremap ss :action SplitHorizontally<CR>
nnoremap sm :action MoveEditorToOppositeTabGroup<CR>
nnoremap sh <c-w>h
nnoremap sl <c-w>l
nnoremap sj <c-w>
nnoremap sk <c-w>k
nnoremap jp :action PreviousTab<CR>
" S => right shift
nnoremap jn :action NextTab<CR>
nnoremap ;q :action CloseContent<CR>
nnoremap ;a :action CloseAllEditors<CR>
" code interactions
nnoremap <leader>c :action CommentByLineComment<CR>
nnoremap <leader>C :action CommentByBlockComment<CR>
nnoremap <leader>r :action RenameElement<CR>
nnoremap <leader>f :action ReformatCode<CR>
nnoremap <leader>re :action Refactorings.QuickListPopupAction<CR>
nnoremap <leader>su :action ShowUsages<CR>
nnoremap <leader>sU :action FindUsages<CR>
nnoremap <leader>m :action CollapseRegion<CR>
nnoremap <leader>M :action ExpandRegion<CR>
nnoremap <leader>am :action CollapseAllRegions<CR>
nnoremap <leader>aM :action ExpandAllRegions<CR>
" goto start with g
" goto LSP start with s
nnoremap ge :action GotoNextError<CR>
nnoremap gE :action GotoNextError<CR>
nnoremap ga :action GotoAction<CR>
nnoremap gc :action GotoClass<CR>
nnoremap gi :action GotoImplementation<CR>
nnoremap si :action LSP.GotoImplementation<CR>
nnoremap go :action GotoSuperMethod<CR>
nnoremap gd :action GotoDeclaration<CR>
nnoremap sd :action LSP.GotoDeclaration<CR>
nnoremap sr :action LSP.GotoReference<CR>
nnoremap st :action LSP.GotoTypeDefinition<CR>
nnoremap gf :action GotoSymbol<CR>
nnoremap gt :action GotoTest<CR>
nnoremap gT :action TextSearchAction<CR>
nnoremap gs :action copilot.chat.show<CR>
" code selection
nnoremap <S-j> :action MoveLineDown<CR>
nnoremap <S-k> :action MoveLineUp<CR>
" debugging
nnoremap <leader>d :action Debug<CR>
nnoremap <leader>dc :action DebugClass
nnoremap <leader>ds :action Stop<CR>
nnoremap <leader>db :action ToggleLineBreakpoint<CR>
" run
nnoremap <leader>rc :action ContextRun<CR>
nnoremap <leader>rx :action ChooseRunConfiguration<CR>
nnoremap <leader>rr :action Rerun<CR>
nnoremap <leader>rt :action RunTests<CR>
nnoremap <leader>rs :action Stop<CR>
" search
nnoremap <leader><leader> :action SearchEverywhere<CR>
"---------- plugins ----------
" easy motion
set easymotion
map f <Plug>(easymotion-s)
" commentary
" gcc | gcm
Plugin 'tpope/vim-commentary'
set commentary
```