From 4f75b1e64393375460c0eb12daede7a942172bba Mon Sep 17 00:00:00 2001 From: Marvin Elsen Date: Wed, 30 Apr 2025 11:36:31 +0200 Subject: [PATCH] Add ideavim dotfiles --- idea/.config/ideavim/ideavimrc | 80 ++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 idea/.config/ideavim/ideavimrc diff --git a/idea/.config/ideavim/ideavimrc b/idea/.config/ideavim/ideavimrc new file mode 100644 index 0000000..b669eb1 --- /dev/null +++ b/idea/.config/ideavim/ideavimrc @@ -0,0 +1,80 @@ +set scrolloff=0 " minimum number of lines above and below the cursor + +set clipboard+=unnamed " Add system clipboard + +set number " print the line number in front of each line +set relativenumber " show the line number relative to the line with the cursor +set idearefactormode=keep " keep the mode that was enabled before starting a refactoring +set ideajoin " join command will be performed via IDE + +set hlsearch " highlight matches with the last search pattern +set ignorecase " ignore case in search patterns +set smartcase " no ignore case when pattern is uppercase +set incsearch " show where search pattern typed so far matches +set wrapscan " searches wrap around the end of file +set gdefault " the :substitute flag 'g' is by default + +Plug 'machakann/vim-highlightedyank' +Plug 'tpope/vim-commentary' +Plug 'easymotion/vim-easymotion' + +" Set to the space bar +let mapleader = " " + +" make Y behave like D and C, yanking till end of line +nnoremap Y y$ + +nnoremap x "_x +nnoremap X "_X + +nmap :noh + +" Run & Debug +nmap gr (Run) +nmap gR (RunClass) + +" Goto +nmap ge (GotoNextError) +nmap gd :vs(GotoDeclaration) +nmap fu (FindUsages) + +" Window Control +nmap gc (CheckinProject) +nmap gp (SelectInProjectView) +nmap (Back) +nmap (Forward) + +" Debugging +nmap gD (Debug) +nmap bs (ToggleLineBreakpoint) +nmap ee (EvaluateExpression) + +nmap w (SaveAll) + +" Refactoring +nmap rr (RenameElement) +nmap rip (IntroduceParameter) +nmap riP (IntroduceProperty) +nmap ref (ExtractFunction) +nmap ril (Inline) + +" Chop argument list +nmap rca (IntentionActionAsAction_org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ChopArgumentListIntention) +" Chop chained function calls +nmap rcc (IntentionActionAsAction_org.jetbrains.kotlin.idea.codeInsight.intentions.shared.PutCallsOnSeparateLinesIntention) +" Add names to call arguments +nmap ran (IntentionActionAsAction_org.jetbrains.kotlin.idea.intentions.AddNamesToCallArgumentsIntention) + +" Code +nmap f (ReformatCode) +nmap o (OptimizeImports) +nmap c (CommentByLineComment) +vmap c (CommentByBlockComment) + +" Don't lose selection when indenting +vnoremap < >gv +vnoremap = =gv + +vnoremap J :m '>+1gv=gv +vnoremap K :m '<-2gv=gv \ No newline at end of file