.ideavimrc自定义配置

该部分还未整理完成,用于自己做记录。

let mapleader=' '

set hlsearch
set incsearch
set ignorecase
set smartcase
set showmode
set number
" set relativenumber
set scrolloff=3
set history=100000
set clipboard=unnamed

" clear the highlighted search result
nnoremap sc :nohlsearch

nnoremap fs :w

nnoremap ? :action GotoAction
nnoremap gi :action GotoDeclaration
nnoremap gu :action GotoImplementation


nnoremap fu :action FindUsages
nnoremap fu :action FindUsages

" Quit normal mode
nnoremap q  :q
nnoremap Q  :qa!

" Move half page faster
nnoremap d  
nnoremap u  

" Insert mode shortcut
inoremap  
inoremap  
inoremap  
inoremap  
inoremap  
inoremap  
inoremap  

" Quit insert mode
inoremap jj 
inoremap jk 
inoremap kk 

" Quit visual mode
vnoremap v 

" Move to the start of line
nnoremap H ^

" Move to the end of line
nnoremap L $

" Redo
nnoremap U 

" Yank to the end of line
nnoremap Y y$

" quit ==> close current window
nnoremap q w

" Window operation
nnoremap ww w
nnoremap wd c
nnoremap wj j
nnoremap wk k
nnoremap wh h
nnoremap wl l
nnoremap ws s
nnoremap w- s
nnoremap wv v
nnoremap w\| v

" Tab operation
nnoremap K gt
nnoremap J gT

" ==================================================
" Show all the provided actions via `:actionlist`
" ==================================================

" built in search looks better
nnoremap / :action Find
" but preserve ideavim search
nnoremap / /

nnoremap ;; :action CommentByLineComment

nnoremap bb :action ToggleLineBreakpoint
nnoremap br :action ViewBreakpoints

nnoremap cv :action ChangeView

nnoremap cd :action ChooseDebugConfiguration


nnoremap ga :action GotoAction
nnoremap gc :action GotoClass
nnoremap gd :action GotoDeclaration
nnoremap gf :action GotoFile
nnoremap gi :action GotoImplementation
nnoremap gs :action GotoSymbol
nnoremap gt :action GotoTest

nnoremap fp :action ShowFilePath

nnoremap ic :action InspectCode

nnoremap mv :action ActivateMavenProjectsToolWindow

nnoremap oi :action OptimizeImports

nnoremap pm :action ShowPopupMenu

nnoremap rc :action RunToCursor
nnoremap rC :action ChooseRunConfiguration
nnoremap rf :action RenameFile

nnoremap rr :action Rerun

nnoremap se :action SearchEverywhere
nnoremap su :action ShowUsages
nnoremap tc :action CloseActiveTab
nnoremap si :action StepInto

nnoremap tb :action ToggleLineBreakpoint



" ==================================================
" Insert mode
" ==================================================

" Quit insert mode
inoremap jk 

" Insert mode shortcut
inoremap  
inoremap  
inoremap  
inoremap  

" 行尾加;并换行
inoremap ; A;
" 行尾加;不换行
inoremap ;; A;
" 给一个单词加"
inoremap ;' viwa'hbi'lEa


" ==================================================
" Normal mode
" ==================================================
" 快速跳转
nnoremap j 
nnoremap k 

" 退出并保存
nnoremap q :wq

" Redo
nnoremap U 

" 移动至行首、行尾
nnoremap H "^"
nnoremap L "$"

" 跳转到上个位置/下个位置
nnoremap h 
nnoremap l 

" 注释
nnoremap cc :action CommentByLineComment

" 标签跳转
nnoremap J gT
nnoremap K gt
 
" 窗口切换
nnoremap  

" Project search
nnoremap ps :action SearchEverywhere
nnoremap of :action GotoFile

" Terminal
nnoremap ot Vy:action ActivateTerminalToolWindow
nooremap ct :action negativeTerminalToolWindow

" 定义相关
nnoremap ga :action GotoAction
nnoremap gc :action GotoClass
nnoremap gi :action GotoDeclaration
nnoremap gf :action GotoFile
nnoremap gs :action GotoSymbol
nnoremap gu :action Vcs.Log.CompactReferencesView 


" 整理格式
nnoremap rf :action ReformatCode   

" 打断点
nnoremap sb :action Debugger.FocusOnBreakpoint

" 跳转到下一个错误
nnoremap nn :action GotoNextError
nnoremap nb :action GotoPreviousError

" 重命名
nnoremap rn :action RenameElement
" ==================================================
" Visual mode
" ==================================================
" 打开终端
vnoremap tl y:action ActivateTerminalToolWindow

" 注释
vnoremap cc :action CommentByLineComment

" 快速跳转
vnoremap j 
vnoremap k 

" 跳转到行首/行尾
vnoremap H "^"
vnoremap L "$"
set clipboard+=ideaput

你可能感兴趣的:(编辑器相关)