mirror of
https://github.com/DefectingCat/dotfiles
synced 2025-07-15 16:51:36 +00:00
update ideavimrc
This commit is contained in:
@ -3,7 +3,7 @@ let mapleader=" "
|
|||||||
""" Plugins --------------------------------
|
""" Plugins --------------------------------
|
||||||
Plug 'easymotion/vim-easymotion'
|
Plug 'easymotion/vim-easymotion'
|
||||||
Plug 'preservim/nerdtree'
|
Plug 'preservim/nerdtree'
|
||||||
set NERDTree
|
"set NERDTree
|
||||||
set surround
|
set surround
|
||||||
set multiple-cursors
|
set multiple-cursors
|
||||||
set commentary
|
set commentary
|
||||||
@ -34,6 +34,7 @@ set idearefactormode=keep
|
|||||||
map Q gq
|
map Q gq
|
||||||
|
|
||||||
let g:EasyMotion_smartcase = 1
|
let g:EasyMotion_smartcase = 1
|
||||||
|
let g:EasyMotion_startofline = 0 " keep cursor column when JK motion
|
||||||
""" Mappings --------------------------------
|
""" Mappings --------------------------------
|
||||||
""" map <leader><leader> <Plug>(easymotion-s)
|
""" map <leader><leader> <Plug>(easymotion-s)
|
||||||
map <leader>w <Plug>(easymotion-w)
|
map <leader>w <Plug>(easymotion-w)
|
||||||
@ -42,10 +43,7 @@ map <leader>j <Plug>(easymotion-j)
|
|||||||
map <leader>k <Plug>(easymotion-k)
|
map <leader>k <Plug>(easymotion-k)
|
||||||
nnoremap <leader>ff :action GotoFile<CR>
|
nnoremap <leader>ff :action GotoFile<CR>
|
||||||
nnoremap <leader>fw :action FindInPath<CR>
|
nnoremap <leader>fw :action FindInPath<CR>
|
||||||
|
nnoremap <leader>fa :action SearchEverywhere<CR>
|
||||||
let g:EasyMotion_startofline = 0 " keep cursor column when JK motion
|
|
||||||
|
|
||||||
"" nnoremap <leader>nh :nohl<CR>
|
|
||||||
nnoremap <esc> :nohl<CR>
|
nnoremap <esc> :nohl<CR>
|
||||||
xnoremap p "_dP
|
xnoremap p "_dP
|
||||||
"" Code
|
"" Code
|
||||||
@ -55,11 +53,14 @@ nmap <C-n> <Plug>NextWholeOccurrence
|
|||||||
xmap <C-n> <Plug>NextWholeOccurrence
|
xmap <C-n> <Plug>NextWholeOccurrence
|
||||||
nmap ]d :action GotoNextError<CR>
|
nmap ]d :action GotoNextError<CR>
|
||||||
nmap [d :action GotoPreviousError<CR>
|
nmap [d :action GotoPreviousError<CR>
|
||||||
nmap gr :action FindUsages<CR>
|
nmap <leader>gr :action FindUsages<CR>
|
||||||
nmap <leader>ca :action ShowIntentionActions<CR>
|
nmap <leader>ca :action ShowIntentionActions<CR>
|
||||||
xmap gb :action CommentByBlockComment<CR>
|
xmap gb :action CommentByBlockComment<CR>
|
||||||
nmap <leader>co :action OptimizeImports<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
|
""" Switch windows
|
||||||
nnoremap <C-h> <c-w>h
|
nnoremap <C-h> <c-w>h
|
||||||
@ -70,31 +71,15 @@ nmap <S-l> :action NextTab<CR>
|
|||||||
nmap <s-h> :action PreviousTab<CR>
|
nmap <s-h> :action PreviousTab<CR>
|
||||||
nmap <leader>x :q<CR>
|
nmap <leader>x :q<CR>
|
||||||
nmap <leader>gg :action ActivateCommitToolWindow<CR>
|
nmap <leader>gg :action ActivateCommitToolWindow<CR>
|
||||||
""" nmap gh :action ShowErrorDescription<CR>
|
|
||||||
|
|
||||||
"" Workspace
|
"" Workspace
|
||||||
nnoremap <leader>| :vs<CR>
|
nnoremap <leader>| :vs<CR>
|
||||||
nnoremap <leader>_ :sp<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
|
"" Extension
|
||||||
set keep-english-in-normal
|
set keep-english-in-normal
|
||||||
|
|
||||||
" Find more examples here: https://jb.gg/share-ideavimrc
|
" Find more examples here: https://jb.gg/share-ideavimrc
|
||||||
|
|
||||||
sethandler <C-2> a:vim
|
sethandler <C-2> a:vim
|
||||||
sethandler <C-;> a:vim
|
sethandler <C-;> a:vim
|
||||||
sethandler <C-S-;> a:vim
|
sethandler <C-S-;> a:vim
|
||||||
|
Reference in New Issue
Block a user