分享我的 ideavim 配置

按键设置风格借鉴 SpaceVim

nmap <Space> <Nop>
let mapleader = " "

" Options
set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
set clipboard+=ideaput
set relativenumber number
set hlsearch
set visualbell
set noerrorbells

" Plugins
Plug 'vim-scripts/argtextobj.vim'
let g:argtextobj_pairs = "(:),{:},[:],<:>"
Plug 'tommcdo/vim-exchange'
set surround
" ideavim-easymotion
set easymotion
set NERDTree
" ideavim-sneak
set sneak

" :actionlist to see all actions

" Navigation
nmap <leader>h :action Back<cr>
nmap <leader>l :action Forward<cr>
nmap <leader>gg :action GotoDeclaration<cr>
nmap <leader>gd :action GoToSuperMethod<cr>
nmap <leader>gi :action GotoImplementation<cr>
nmap <leader>gf :action GotoFile<cr>
nmap <leader>gs :action GotoSymbol<cr>
vmap <leader>gf :action GotoFile<cr>
nmap <leader>gr :action RecentChangedFiles<cr>
nmap <leader>s <Plug>(easymotion-s)
vmap <leader>s <Plug>(easymotion-s)

" Error navigation
nmap <leader>ej :action GotoNextError<cr>
nmap <leader>ek :action GotoPreviousError<cr>
nmap <leader>el :action ShowErrorDescription<CR>

" Tab management
nmap H :action PreviousTab<cr>
nmap L :action NextTab<cr>
nmap <leader>tx :action CloseEditor<cr>
nmap <leader>ta :action CloseAllEditorsButActive<cr>
nmap <leader>th :action SplitHorizontally<cr>zz
nmap <leader>tj :action SplitVertically<cr>zz
nmap <leader>tm :action MoveEditorToOppositeTabGroup<cr>

" Version control
nmap <leader>vu :action Vcs.UpdateProject<cr>
nmap <leader>vp :action Vcs.Push<cr>
nmap <leader>vb :action Annotate<cr>
" idea plugin - gitlab mergerequest
nmap <leader>vm :action ActivateGitLabMergeRequestsToolWindow<cr>

" Misc
nmap <leader>rg :action Generate<cr>
nmap <TAB> :action HideAllWindows<cr>
vim·intellij-idea
533 views
Comments
登录后评论
Sign In