" enable plugin set easymotion set surround set clipboard=unnamed,autoselect let mapleader = "," let g:mapleader = "," set hlsearch set incsearch set scrolloff=5 set ignorecase set smartcase set showmode set history=10000 " source ~/.vimrc " general nnoremap e :action SearchEverywhere vnoremap e :action SearchEverywhere nnoremap s :action FileStructurePopup " nnoremap g :action FindInPath " vnoremap g :action FindInPath nnoremap r :action RenameElement " Vertical split screen nnoremap wv v vnoremap wv v nnoremap ws s nnoremap h nnoremap l nnoremap j nnoremap k " vnoremap ,r :action RecentFiles " Redo nnoremap U " go to 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 gl :action JumpToLastChange nnoremap gu :action ShowUsages nnoremap gt :action GotoTest nnoremap gp :action FindInPath " cmd + [ and cmd + ] " nnoremap gh :action Back " nnoremap gl :action Forward " code editing nnoremap f :action ReformatCode nnoremap == :action ReformatCode vnoremap == :action ReformatCode " nnoremap \i :action OptimizeImports " vnoremap \i :action OptimizeImports " nnoremap \r :action RenameElement nnoremap q :action ShowIntentionActions nnoremap cc :action CommentByLineComment vnoremap cc :action CommentByLineComment " show information nnoremap :action QuickJavaDoc " 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 " clear the search buffer when hitting return " nnoremap :nohlsearch " options nnoremap cow :action EditorToggleUseSoftWraps nnoremap col :action EditorToggleShowWhitespaces nnoremap ta :action Annotate nnoremap tb :action ToggleLineBreakpoint nnoremap tp :action ActivateProjectToolWindow " actions nnoremap q :action CloseContent nnoremap Q :action ReopenClosedTab nnoremap \ :action VimFilePrevious nnoremap e :action SearchEverywhere nnoremap E :action Switcher nnoremap t :action FileStructurePopup nnoremap T :action GotoSymbol 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 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 [m :action MethodUp nnoremap ]m :action MethodDown nnoremap [c :action VcsShowPrevChangeMarker nnoremap ]c :action VcsShowNextChangeMarker " built-in navigation to navigated items works better " nnoremap :action Back " nnoremap :action Forward " but preserve ideavim defaults nnoremap g nnoremap g " built in search looks better " nnoremap / :action Find " but preserve ideavim search nnoremap g/ / " easy motion" map , (easymotion-prefix) "Turn on case insensitive feature let g:EasyMotion_smartcase = 1 "Use upper target labels and type as a lower case let g:EasyMotion_use_upper = 0 " move to character nmap f (easymotion-s2) xmap f (easymotion-s2) omap f (easymotion-s2) " move to word nmap F (easymotion-bd-w) xmap F (easymotion-bd-w) omap F (easymotion-bd-w) " move to line " nmap gl (easymotion-bd-jk) " xmap gl (easymotion-bd-jk) " omap gl (easymotion-bd-jk) " acejump" " Press `f` to activate AceJump nnoremap f :action AceAction " Press `F` to activate Target Mode " 在 Target 模式下会跳转到目标,并选中目标整个Word" nnoremap F :action AceTargetAction " Press `g` to activate Line Mode " nnoremap g :action AceLineAction