From 9fbad6671edeec6c7368aeaf54d387c786532c97 Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Thu, 15 Oct 2020 19:01:42 +0800 Subject: [PATCH] ideavimrc: adjust --- idea/.ideavimrc | 56 ++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/idea/.ideavimrc b/idea/.ideavimrc index a3ec140..3683183 100644 --- a/idea/.ideavimrc +++ b/idea/.ideavimrc @@ -1,11 +1,12 @@ " enable plugin set easymotion set surround -set clipboard=unnamed,autoselect +" set clipboard=unnamed,autoselect let mapleader = "," let g:mapleader = "," +" https://github.com/JetBrains/ideavim/blob/master/doc/set-commands.md set hlsearch set incsearch set scrolloff=5 @@ -13,20 +14,25 @@ set ignorecase set smartcase set showmode set history=10000 +" set showmode " source ~/.vimrc " general nnoremap e :action SearchEverywhere vnoremap e :action SearchEverywhere -nnoremap s :action FileStructurePopup -" nnoremap g :action FindInPath -" vnoremap g :action FindInPath +nnoremap f :action ReformatCode +nnoremap g :action FindInPath +vnoremap g :action FindInPath nnoremap r :action RenameElement +nnoremap o :action RecentProjectListGroup +nnoremap d :action ChooseDebugConfiguration +nnoremap w :action CloseAllEditorsButActive + +" screen management " Vertical split screen -nnoremap wv v -vnoremap wv v -nnoremap ws s +nnoremap \ v +nnoremap - s nnoremap h nnoremap l nnoremap j @@ -52,7 +58,6 @@ nnoremap gr :action RecentFiles " nnoremap gl :action Forward " code editing -nnoremap f :action ReformatCode nnoremap == :action ReformatCode vnoremap == :action ReformatCode " nnoremap \i :action OptimizeImports @@ -65,15 +70,10 @@ vnoremap cc :action CommentByLineComment " show information nnoremap :action QuickJavaDoc +" 在 Tab 间切换 Alt/Option + h/l +nnoremap h gT +nnoremap l gt -" easy window navigation -" nnoremap l -" nnoremap j -" nnoremap h -" nnoremap k -" 在 Tab 间切换 Alt + h/l -nnoremap gT -nnoremap gt " Ctrl+Shift+Tab Ctrl+Tab nnoremap gT nnoremap gt @@ -81,6 +81,9 @@ nnoremap gt " clear the search buffer when hitting return " nnoremap :nohlsearch +" show information +nnoremap :action QuickJavaDoc + " options nnoremap cow :action EditorToggleUseSoftWraps nnoremap col :action EditorToggleShowWhitespaces @@ -100,10 +103,7 @@ nnoremap a :action Annotate nnoremap b :action ToggleLineBreakpoint " code navigation -nnoremap ] :action GotoImplementation -nnoremap [ :action GotoSuperMethod nnoremap u :action FindUsages -nnoremap gt :action GotoTest nnoremap k :action HighlightUsagesInFile nnoremap \r :action RunClass nnoremap \R :action Run @@ -111,14 +111,11 @@ nnoremap \d :action DebugClass nnoremap \D :action Debug nnoremap \c :action CheckStyleCurrentFileAction -" code refactoring -" nnoremap rr :action RenameElement - " unimpaired mappings nnoremap [ Oj nnoremap ] ok -nnoremap [q :action PreviousOccurence -nnoremap ]q :action NextOccurence +nnoremap [q :action PreviousOccurrence +nnoremap ]q :action NextOccurrence nnoremap [m :action MethodUp nnoremap ]m :action MethodDown nnoremap [c :action VcsShowPrevChangeMarker @@ -166,3 +163,14 @@ nnoremap f :action AceAction nnoremap F :action AceTargetAction " Press `g` to activate Line Mode " nnoremap g :action AceLineAction + +" kick intellij commands +" nnoremap R :action ChooseRunConfiguration +nnoremap D :action ChooseRunConfiguration +" nnoremap F5 :action StepInto +" nnoremap F6 :action StepOver +" nnoremap F8 :action Resume + +" window +nnoremap s; :action CloseActiveTab +nnoremap so :action MoveEditorToOppositeTabGroup