Last active
August 22, 2023 12:33
-
-
Save punkmonday/dfdc1472719afad03787daa75a8ced7c to your computer and use it in GitHub Desktop.
my .ideavimrc
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
"" Source your .vimrc | |
"source ~/.vimrc | |
"" -- Suggested options -- | |
" Show a few lines of context around the cursor. Note that this makes the | |
" text scroll if you mouse-click near the start or end of the window. | |
set number relativenumber | |
set idearefactormode=keep | |
set ideajoin | |
set surround | |
set easymotion | |
set NERDTree | |
let g:NERDTreeMapActivateNode='l' | |
let g:NERDTreeMapJumpParent='h' | |
let mapleader = "," | |
set clipboard+=unnamed | |
set smartcase | |
set keep-english-in-normal | |
set keep-english-in-normal-restore-in-insert | |
" Do incremental searching. | |
set incsearch | |
" Don't use Ex mode, use Q for formatting. | |
map Q gq | |
"" -- 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) | |
" Find more examples here: https://jb.gg/share-ideavimrc | |
" 映射到idea快捷键 | |
" 弹出输入框,可以跳到指定类 | |
nmap <leader>gc <Action>(GotoClass) | |
" 弹出输入框,跳转到指定操作 | |
nmap <leader>ga <Action>(GotoAction) | |
" 跳转到定义 | |
" nnoremap <leader>gd <Action>(GotoDeclaration) | |
" 跳转到实现 | |
nmap gi <Action>(GotoImplementation) | |
" 跳转到指定的文件 | |
nmap <leader>gf <Action>(GotoFile) | |
" 跳转到方法的声明 | |
nmap <leader>gs <Action>(GotoSuperMethod) | |
" 跳转到测试 | |
nmap <leader>gt <Action>(GotoTest) | |
" 跳转到变量的声明 | |
nmap <leader>gS <Action>(GotoSymbol) | |
" 前进,相当似于eclipse中的alt+方向右键 | |
nmap gf <Action>(Forward) | |
" 后退,相当于eclipse中的alt+方向左键 | |
nmap gb <Action>(Back) | |
" call hierarchy | |
nmap ch <Action>(CallHierarchy) | |
" 重命名 | |
nmap re <Action>(RenameElement) | |
" 打开Switcher | |
nmap <leader>j <Action>(Switcher) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment