1
0
mirror of https://github.com/chylex/dotfiles.git synced 2024-11-25 14:42:46 +01:00

Compare commits

..

No commits in common. "6ac6c169fa24d377bb44e63d6f7172df60849b71" and "ea590d93c1efbb7138c9520fea5e3122c12b856c" have entirely different histories.

View File

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