update ideavimrc

This commit is contained in:
DefectingCat
2024-02-07 08:36:09 +08:00
parent 465b05e563
commit 8f43c3a78d

View File

@ -3,7 +3,7 @@ let mapleader=" "
""" Plugins --------------------------------
Plug 'easymotion/vim-easymotion'
Plug 'preservim/nerdtree'
set NERDTree
"set NERDTree
set surround
set multiple-cursors
set commentary
@ -34,6 +34,7 @@ set idearefactormode=keep
map Q gq
let g:EasyMotion_smartcase = 1
let g:EasyMotion_startofline = 0 " keep cursor column when JK motion
""" Mappings --------------------------------
""" map <leader><leader> <Plug>(easymotion-s)
map <leader>w <Plug>(easymotion-w)
@ -42,10 +43,7 @@ map <leader>j <Plug>(easymotion-j)
map <leader>k <Plug>(easymotion-k)
nnoremap <leader>ff :action GotoFile<CR>
nnoremap <leader>fw :action FindInPath<CR>
let g:EasyMotion_startofline = 0 " keep cursor column when JK motion
"" nnoremap <leader>nh :nohl<CR>
nnoremap <leader>fa :action SearchEverywhere<CR>
nnoremap <esc> :nohl<CR>
xnoremap p "_dP
"" Code
@ -55,11 +53,14 @@ nmap <C-n> <Plug>NextWholeOccurrence
xmap <C-n> <Plug>NextWholeOccurrence
nmap ]d :action GotoNextError<CR>
nmap [d :action GotoPreviousError<CR>
nmap gr :action FindUsages<CR>
nmap <leader>gr :action FindUsages<CR>
nmap <leader>ca :action ShowIntentionActions<CR>
xmap gb :action CommentByBlockComment<CR>
nmap <leader>co :action OptimizeImports<CR>
"" Debug and run
nnoremap <leader>db :action ToggleLineBreakpoint<CR>
nnoremap <leader>dr :action Debug<CR>
nmap <leader>rr :action Run<CR>
""" Switch windows
nnoremap <C-h> <c-w>h
@ -70,31 +71,15 @@ nmap <S-l> :action NextTab<CR>
nmap <s-h> :action PreviousTab<CR>
nmap <leader>x :q<CR>
nmap <leader>gg :action ActivateCommitToolWindow<CR>
""" nmap gh :action ShowErrorDescription<CR>
"" Workspace
nnoremap <leader>| :vs<CR>
nnoremap <leader>_ :sp<CR>
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
"" Debug
nnoremap <leader>db :action ToggleLineBreakpoint<CR>
nnoremap <leader>dr :action Run<CR>
"" Extension
set keep-english-in-normal
" Find more examples here: https://jb.gg/share-ideavimrc
sethandler <C-2> a:vim
sethandler <C-;> a:vim
sethandler <C-S-;> a:vim