diff --git a/idea/.ideavimrc b/idea/.ideavimrc index 3683183..a201a8c 100644 --- a/idea/.ideavimrc +++ b/idea/.ideavimrc @@ -1,8 +1,15 @@ " enable plugin set easymotion set surround +set multiple-cursors +set nu +" 相对行号 +set rnu " set clipboard=unnamed,autoselect +" Use comma as leader key, there are other modifier keys in this config, +" like space, \, t(in normal mode for toggle something), +" g(in normal mode for goto somewhere) let mapleader = "," let g:mapleader = "," @@ -12,15 +19,15 @@ set incsearch set scrolloff=5 set ignorecase set smartcase +" 当前模式 set showmode set history=10000 -" set showmode " source ~/.vimrc +noremap r :source ~/.ideavimrc + " general -nnoremap e :action SearchEverywhere -vnoremap e :action SearchEverywhere nnoremap f :action ReformatCode nnoremap g :action FindInPath vnoremap g :action FindInPath @@ -31,23 +38,24 @@ nnoremap w :action CloseAllEditorsButActive " screen management " Vertical split screen -nnoremap \ v -nnoremap - s -nnoremap h -nnoremap l -nnoremap j -nnoremap k +nnoremap \ v +nnoremap - s +nnoremap h +nnoremap l +nnoremap j +nnoremap k " Redo nnoremap U -" go to somewhere +" go to somewhere (g in normal mode for goto somewhere) nnoremap ga :action GotoAction nnoremap gc :action GotoClass nnoremap gd :action GotoDeclaration nnoremap gs :action GotoSuperMethod nnoremap gi :action GotoImplementation nnoremap gf :action GotoFile +nnoremap gm :action GotoSymbol nnoremap gl :action JumpToLastChange nnoremap gu :action ShowUsages nnoremap gt :action GotoTest @@ -79,7 +87,7 @@ nnoremap gT nnoremap gt " clear the search buffer when hitting return -" nnoremap :nohlsearch +nnoremap :nohlsearch " show information nnoremap :action QuickJavaDoc @@ -101,10 +109,10 @@ nnoremap t :action FileStructurePopup nnoremap T :action GotoSymbol nnoremap a :action Annotate nnoremap b :action ToggleLineBreakpoint - -" code navigation nnoremap u :action FindUsages nnoremap k :action HighlightUsagesInFile + +" Run and debug nnoremap \r :action RunClass nnoremap \R :action Run nnoremap \d :action DebugClass @@ -132,7 +140,12 @@ nnoremap g " built in search looks better " nnoremap / :action Find " but preserve ideavim search -nnoremap g/ / +nnoremap g/ :action FindInPath +noremap ' :action Replace +noremap g' :action ReplaceInPath + +nnoremap [[ :action MethodUp +nnoremap ]] :action MethodDown " easy motion" map , (easymotion-prefix) @@ -174,3 +187,6 @@ nnoremap D :action ChooseRunConfiguration " window nnoremap s; :action CloseActiveTab nnoremap so :action MoveEditorToOppositeTabGroup + +" multiple cursors +" , , , g \ No newline at end of file