1
0
mirror of https://github.com/chylex/dotfiles.git synced 2024-10-18 11:42:49 +02:00

Compare commits

...

7 Commits

View File

@ -55,6 +55,7 @@ sethandler <C-O> a:vim
sethandler <C-P> a:vim sethandler <C-P> a:vim
sethandler <C-U> a:vim sethandler <C-U> a:vim
sethandler <C-W> a:vim sethandler <C-W> a:vim
sethandler <C-S-W> a:vim
" Enable plugins (https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins) " Enable plugins (https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins)
Plug 'argtextobj.vim' Plug 'argtextobj.vim'
@ -96,17 +97,15 @@ xnoremap H ]b
noremap <A-b> ge noremap <A-b> ge
noremap <A-S-b> gE noremap <A-S-b> gE
" Navigate and close tabs " Navigate editor tabs
noremap <A-h> gT noremap <A-h> gT
noremap <A-l> gt noremap <A-l> gt
inoremap <A-h> <C-o>gT inoremap <A-h> <C-o>gT
inoremap <A-l> <C-o>gt inoremap <A-l> <C-o>gt
noremap <C-w> :action CloseContent<CR>
" Increment/decrement numbers " Increment/decrement numbers
nnoremap <Bar>+ <C-a> noremap <Bar>+ <C-a>
nnoremap <Bar>- <C-x> noremap <Bar>- <C-x>
" Edit from cursor to start/end of parenthesized block " Edit from cursor to start/end of parenthesized block
nnoremap c) c]) nnoremap c) c])
@ -138,53 +137,83 @@ nnoremap gp `[v`]
xnoremap p P xnoremap p P
xnoremap P p xnoremap P p
" Navigate back/forward
nmap <BS> <Action>(Back)
nmap <S-BS> <Action>(Forward)
" Show parameter info " Show parameter info
nmap <A-p> <Action>(ParameterInfo) nmap <A-p> <Action>(ParameterInfo)
imap <A-p> <Action>(ParameterInfo) imap <A-p> <Action>(ParameterInfo)
" Rebind commands that will be repurposed " Toggle comments
nmap <C--> <Action>(CommentByLineComment)
vmap <C--> <Action>(CommentByBlockComment)
nmap <D--> <C-->
vmap <D--> <C-->
" Navigate back/forward
nmap <BS> <Action>(Back)
nmap <S-BS> <Action>(Forward)
" Navigate to previous/next method
nnoremap [ [m
xnoremap [ [m
nnoremap ] ]m
xnoremap ] ]m
" Alternative bindings for square bracket commands
nnoremap g[ [
xnoremap g[ [
nnoremap g] ]
xnoremap g] ]
" Manage editor tabs
noremap <C-w> :action CloseContent<CR>
noremap <C-S-w> :action ReopenClosedTab<CR>
noremap \\ <C-w>
noremap \\s :action MoveTabDown<CR>
noremap \\S <C-w>s
noremap \\u :action Unsplit<CR>
noremap \\U :action UnsplitAll<CR>
noremap \\v :action MoveTabRight<CR>
noremap \\V <C-w>v
noremap \\qa :action CloseAllEditors<CR>
noremap \\qh :action CloseAllToTheLeft<CR>
noremap \\ql :action CloseAllToTheRight<CR>
noremap \\qo :action CloseAllEditorsButActive<CR>
" Rebind repurposed commands
nnoremap GG G nnoremap GG G
nnoremap dG dG nnoremap dG dG
nnoremap cG cG nnoremap cG cG
nnoremap M m nnoremap M m
nnoremap Z z nnoremap Z z
noremap \\ <C-w>
" Repurpose 'Enter' for statement completion (requires a custom version of IdeaVIM) " Repurpose 'Enter' for statement completion (requires a custom version of IdeaVIM)
nmap <Enter> :action EditorCompleteStatement<CR> nmap <Enter> <Action>(EditorCompleteStatement)
" Repurpose special characters for navigation " Repurpose special characters for navigation
nmap ( :raction GotoPreviousError<CR> nmap ( :raction GotoPreviousError<CR>
nmap ) :raction GotoNextError<CR> nmap ) :raction GotoNextError<CR>
nmap [ :raction MethodUp<CR>
nmap ] :raction MethodDown<CR>
nmap { :raction JumpToLastChange<CR>
nmap } :raction JumpToNextChange<CR>
" Repurpose 'g' for navigation (:raction requires a custom version of IdeaVIM) " Repurpose 'g' for navigation (:raction requires a custom version of IdeaVIM)
nmap gb :raction GotoNextBookmark<CR> nmap gb :raction GotoNextBookmark<CR>
nmap gB :raction GotoPreviousBookmark<CR> nmap gB :raction GotoPreviousBookmark<CR>
nmap gd :action GotoDeclaration<CR> nmap gD <Action>(GotoTypeDeclaration)
nmap gD :action GotoTypeDeclaration<CR>
nmap ge :raction VcsShowNextChangeMarker<CR> nmap ge :raction VcsShowNextChangeMarker<CR>
nmap gE :raction VcsShowPrevChangeMarker<CR> nmap gE :raction VcsShowPrevChangeMarker<CR>
nmap gi :action GotoImplementation<CR> nmap gf <Action>(EditSource)
nmap gi <Action>(GotoImplementation)
map gj :raction EditorCloneCaretBelow<CR> map gj :raction EditorCloneCaretBelow<CR>
map gk :raction EditorCloneCaretAbove<CR> map gk :raction EditorCloneCaretAbove<CR>
nmap gr :action RecentLocations<CR> nmap gr <Action>(RecentLocations)
nmap gR :action RecentChangedFiles<CR> nmap gR <Action>(RecentChangedFiles)
nmap gs :action GotoSuperMethod<CR> nmap gs <Action>(GotoSuperMethod)
nmap gS :action ShowSiblings<CR> nmap gS <Action>(ShowSiblings)
map gt :raction KM.GotoNextTypeInFile<CR> map gt :raction KM.GotoNextTypeInFile<CR>
map gT :raction KM.GotoPreviousTypeInFile<CR> map gT :raction KM.GotoPreviousTypeInFile<CR>
nmap gu :action ShowUsages<CR> nmap gu <Action>(ShowUsages)
nmap gU :action FindUsages<CR> nmap gU <Action>(FindUsages)
map gz :action NextSplitter<CR> map gz <Action>(NextSplitter)
map gZ :action PrevSplitter<CR> map gZ <Action>(PrevSplitter)
nmap g( :raction KM.GotoPreviousErrorInOtherMode<CR> nmap g( :raction KM.GotoPreviousErrorInOtherMode<CR>
nmap g) :raction KM.GotoNextErrorInOtherMode<CR> nmap g) :raction KM.GotoNextErrorInOtherMode<CR>
@ -200,69 +229,60 @@ nmap GT gT
map Gz gz map Gz gz
map GZ gZ map GZ gZ
" Repurpose 'z' for view actions, debugger, and tab management " Repurpose 'z' for view actions and debugger
map za :action Annotate<CR> map za <Action>(Annotate)
map zb :action ViewBreakpoints<CR> map zb <Action>(ViewBreakpoints)
map zc :action EditorContextInfo<CR> map zc <Action>(EditorContextInfo)
map zd :action QuickJavaDoc<CR> map zd <Action>(QuickJavaDoc)
map ze :action ShowErrorDescription<CR> map ze <Action>(ShowErrorDescription)
map zf :action SelectInProjectView<CR> map zf <Action>(SelectInProjectView)
map zht :action TypeHierarchy<CR> map zht <Action>(TypeHierarchy)
map zhm :action MethodHierarchy<CR> map zhm <Action>(MethodHierarchy)
map zhc :action CallHierarchy<CR> map zhc <Action>(CallHierarchy)
map zm :action ShowBookmarks<CR> map zm <Action>(ShowBookmarks)
map zp :action QuickImplementations<CR> map zp <Action>(QuickImplementations)
map zP :action QuickTypeDefinition<CR> map zP <Action>(QuickTypeDefinition)
map zqa :action CloseAllEditors<CR> map zr <Action>(RunToCursor)
map zqh :action CloseAllToTheLeft<CR> map zR <Action>(ForceRunToCursor)
map zql :action CloseAllToTheRight<CR>
map zqo :action CloseAllEditorsButActive<CR>
map zqq :action CloseContent<CR>
map zqu :action ReopenClosedTab<CR>
map zr :action RunToCursor<CR> map zt <Action>(ExpressionTypeInfo)
map zR :action ForceRunToCursor<CR> map zx <Action>(EvaluateExpression)
map zsd :action MoveTabDown<CR>
map zsr :action MoveTabRight<CR>
map zsu :action Unsplit<CR>
map zsU :action UnsplitAll<CR>
map zt :action ExpressionTypeInfo<CR>
map zx :action EvaluateExpression<CR>
" Repurpose 'm' for refactoring (normal mode) " Repurpose 'm' for refactoring (normal mode)
nmap md :action SafeDelete<CR> nmap md <Action>(SafeDelete)
nmap mg :action Generate<CR> nmap me <Action>(Move)
nmap mi :action Inline<CR> nmap mg <Action>(Generate)
nmap mn :action RenameElement<CR> nmap mi <Action>(Inline)
nmap mo :action OverrideMethods<CR> nmap mn <Action>(RenameElement)
nmap ms :action ChangeSignature<CR> nmap mo <Action>(OverrideMethods)
nmap mS :action NewScratchFile<CR> nmap ms <Action>(ChangeSignature)
nmap mS <Action>(NewScratchFile)
" Repurpose 'm' for refactoring (normal / visual mode) " Repurpose 'm' for refactoring (normal / visual mode)
nmap mc :action IntroduceConstant<CR> nmap mc <Action>(IntroduceConstant)
xmap mc :action IntroduceConstant<CR> xmap mc <Action>(IntroduceConstant)
nmap mf :action IntroduceField<CR> nmap mf <Action>(IntroduceField)
xmap mf :action IntroduceField<CR> xmap mf <Action>(IntroduceField)
nmap mm :action ExtractMethod<CR> nmap mm <Action>(ExtractMethod)
xmap mm :action ExtractMethod<CR> xmap mm <Action>(ExtractMethod)
nmap mM :action ExtractFunction<CR> nmap mM <Action>(ExtractFunction)
xmap mM :action ExtractFunction<CR> xmap mM <Action>(ExtractFunction)
nmap mp :action IntroduceParameter<CR> nmap mp <Action>(IntroduceParameter)
xmap mp :action IntroduceParameter<CR> xmap mp <Action>(IntroduceParameter)
nmap mP :action IntroduceProperty<CR> nmap mP <Action>(IntroduceProperty)
xmap mP :action IntroduceProperty<CR> xmap mP <Action>(IntroduceProperty)
nmap mr :action Refactorings.QuickListPopupAction<CR> nmap mr <Action>(Refactorings.QuickListPopupAction)
xmap mr :action Refactorings.QuickListPopupAction<CR> xmap mr <Action>(Refactorings.QuickListPopupAction)
nmap mv :action IntroduceVariable<CR> nmap mt <Action>(InsertLiveTemplate)
xmap mv :action IntroduceVariable<CR> xmap mt <Action>(SurroundWithLiveTemplate)
nmap mw :action SurroundWith<CR> nmap mv <Action>(IntroduceVariable)
xmap mw :action SurroundWith<CR> xmap mv <Action>(IntroduceVariable)
nmap mw <Action>(SurroundWith)
xmap mw <Action>(SurroundWith)
" Actions for custom version of AceJump " Actions for custom version of AceJump
set acejump set acejump
map <Space> :action AceVimAction_JumpAllEditors<CR> map <Space> <Action>(AceVimAction_JumpAllEditors)