Created
April 27, 2022 03:03
-
-
Save dreamkidd/c3354846512aba6017cd10d48048cdf1 to your computer and use it in GitHub Desktop.
.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
Plug 'preservim/nerdtree' | |
Plug 'tpope/vim-surround' | |
Plug 'easymotion/vim-easymotion' | |
Plug 'terryma/vim-multiple-cursors' | |
Plug 'michaeljsmith/vim-indent-object' | |
Plug 'tommcdo/vim-exchange' | |
set textobj-indent | |
" argtextobj config | |
Plug 'vim-scripts/argtextobj.vim' | |
let g:argtextobj_pairs="[:],(:),<:>" | |
Plug 'kana/vim-textobj-entire' | |
let mapleader=' ' | |
set hlsearch " highlight searches | |
set incsearch " do incremental searching, search as you type | |
set ignorecase " ignore case when searching | |
set smartcase " no ignorecase if Uppercase char present | |
set clipboard=unnamedplus " 使用系统粘贴板(vim用y粘贴的内容也可以通过command + c 粘贴) | |
set showmode=keep | |
set idearefactormode=keep | |
" plugin | |
set ideajoin | |
set ideamark | |
set NERDTree | |
set surround | |
set easymotion | |
set highlightedyank | |
set argtextobj | |
set exchange | |
set surround | |
set multiple-cursors | |
set commentary | |
set keep-english-in-normal-and-restore-in-insert | |
set nu | |
set rnu | |
set so=5 | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftround=true | |
set shiftwidth=4 | |
nnoremap \e :e ~/.ideavimrc<CR> | |
nnoremap \r :action IdeaVim.ReloadVimRc.reload<CR> | |
let g:highlightedyank_highlight_duration="1000" | |
let g:highlightedyank_highlight_color = "rgba(160, 160, 160, 155)" | |
noremap \ , | |
nnoremap L $ | |
nnoremap H ^ | |
nnoremap ; : | |
nnoremap <c-z> :action ToggleDistractionFreeMode<CR> | |
"terminal | |
nnoremap <c-t> :action ActivateTerminalToolWindow<CR> | |
nnoremap <leader>t :action Terminal.OpenInTerminal<CR> | |
" global find | |
imap jj <ESC> | |
nmap <C-n> <Plug>NextWholeOccurrence | |
xmap <C-n> <Plug>NextWholeOccurrence | |
nmap g<C-n> <Plug>NextOccurrence | |
xmap g<C-n> <Plug>NextOccurrence | |
" multiple occurrence | |
nmap <C-x> <Plug>SkipOccurrence | |
xmap <C-x> <Plug>SkipOccurrence | |
nmap <C-p> <Plug>RemoveOccurrence | |
xmap <C-p> <Plug>RemoveOccurrence | |
" fast move | |
nnoremap gc :action GotoClass<CR> | |
nnoremap gi :action GotoImplementation<CR> | |
nnoremap gd :action GotoDeclaration<CR> | |
nnoremap gp :action GotoPrevious<CR> | |
nnoremap gn :action GotoNext<CR> | |
nnoremap gf :action GotoFile<CR> | |
nnoremap gt :action GotoTest<CR> | |
nnoremap gb :action Back<CR> | |
nnoremap gm :action GotoMethod<CR> | |
nnoremap ge :action GotoNextError<CR> | |
nnoremap gE :action GotoPreviousError<CR> | |
nnoremap gM :action GotoMatchingBracket<CR> | |
nnoremap gc :action GotoClass<CR> | |
nnoremap iv :action IntroduceVariable<CR> | |
nnoremap cr :action CopyReference<CR> | |
nnoremap em :action ExtractMethod<CR> | |
nnoremap sw :action SurroundWith<CR> | |
nnoremap im :action ImplementMethods<CR> | |
nnoremap sv :action SplitVertically<CR> | |
nnoremap sh :action SplitHorizontally<CR> | |
nnoremap sc :action CloseContent<CR> | |
" NERDTree | |
map <c-t> :NERDTree<CR> | |
" easymotion | |
map <leader>F <Plug>(easymotion-s) | |
map <leader>f <Plug>(easymotion-f) | |
map <leader>j <Plug>(easymotion-j) | |
map <leader>k <Plug>(easymotion-k) | |
" search | |
nnoremap <leader>ff :action SearchEverywhere<CR> | |
nnoremap <leader>fg :action FindInPath<CR> | |
“ running debug | |
nnoremap ,r :action ContextRun<CR> | |
nnoremap ,c :action RunClass<CR> | |
nnoremap ,f :action ChooseRunConfiguration<CR> | |
nnoremap ,t :action ActivateRunToolWindow<CR> | |
nnoremap ,u :action Rerun<CR> | |
nnoremap ,f :action RerunFailedTests<CR> | |
nnoremap ,b :action ToggleLineBreakpoint<CR> | |
nnoremap ,d :action ContextDebug<CR> | |
nnoremap ,n :action ActivateDebugToolWindow<CR> | |
" edit | |
vnoremap < <gv | |
vnoremap > >gv | |
nnoremap [[ :action MethodUp<CR> | |
nnoremap ]] :action MethodDown<CR> | |
nnoremap zc :action CollapseRegion<CR> | |
nnoremap zo :action ExpandRegion<CR> | |
nnoremap <leader>r :action Refactorings.QuickListPopupAction<CR> | |
nnoremap <Leader>= :action ReformatCode<CR> | |
nnoremap <leader>i :action OptimizeImports<CR> | |
nnoremap <leader>n :action ShowIntentionActions<CR> | |
noremap rn :action RenameElement<CR> | |
nnoremap <TAB> :action PreviousTab<CR> | |
nnoremap <s-TAB> :action NextTab<CR> | |
nnoremap <c-h> <c-w>h | |
nnoremap <c-l> <c-w>l | |
nnoremap <c-j> <c-w>j | |
nnoremap <c-k> <c-w>k | |
nnoremap <Cmd-k> :action EditorUp<CR> | |
nnoremap <Cmd-j> :action EditorDown<CR> | |
nnoremap <c-o> :action SelectInProjectView<CR> | |
set which-key | |
set notimeout | |
set timeoutlen=5000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment