From 8b1a2afe5443f5985fc5fc8daa28855afac5bb4c Mon Sep 17 00:00:00 2001 From: jabuxas Date: Thu, 10 Oct 2024 18:23:38 -0300 Subject: [PATCH] feat: add intellij vim config --- laptop/configs/home/.ideavimrc | 133 +++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 laptop/configs/home/.ideavimrc diff --git a/laptop/configs/home/.ideavimrc b/laptop/configs/home/.ideavimrc new file mode 100644 index 0000000..307c7e9 --- /dev/null +++ b/laptop/configs/home/.ideavimrc @@ -0,0 +1,133 @@ +" plugins +Plug 'tpope/vim-commentary' + +set which-key +set commentary +" Set mouse to "a" +set mouse=a + +" Set line numbers and relative line numbers +set nu +set rnu + +" Append to clipboard +set clipboard+=unnamedplus + +" Set tab settings +set tabstop=2 +set softtabstop=2 +set shiftwidth=2 +set expandtab + +" Enable smart indentation +set smartindent + +" Disable text wrapping +set nowrap + +" Disable swap and backup files, enable undofile +set noswapfile +set nobackup +let &undodir = $HOME . "/.vim/undodir" +set undofile + +" Disable highlighting search results and enable incremental search +set nohlsearch +set incsearch + +" Set scrolloff and signcolumn +set scrolloff=8 +set signcolumn=yes + +" Set filename characters +set isfname+=@-@ + +" Set update time +set updatetime=50 + +" Set colorcolumn +set colorcolumn=80 +autocmd WinLeave * let &colorcolumn = "0" +autocmd WinEnter * let &colorcolumn = "80" + +" Disable status line, command line, ruler, and mode display +set laststatus=0 +set noshowcmd +set noruler +set noshowmode + +" Set conceal level and cursor +set conceallevel=2 +set concealcursor=n + +" Set map leader to " " +let mapleader = " " + +" Set case insensitive searching, smart case, and completion options +set ignorecase +set smartcase +set completeopt=menuone,noselect + +" Set split settings +set splitright +set splitbelow + +" Enable termguicolors and set terminal color +set termguicolors +let &t_Cs = "\e[4:3m" +let &t_Ce = "\e[4:0m" + +set notimeout + +" Normal mode mappings +nnoremap J :m '>+1gv=gv +nnoremap K :m '<-2gv=gv +nnoremap J mzJ`z +nnoremap zz +nnoremap zz +nnoremap n nzzzv +nnoremap N Nzzzv +nnoremap p [["_dP]] +nnoremap yy "+y +nnoremap Y "+Y +nnoremap dd "_d +nnoremap +nnoremap Q +nnoremap :cnextzz +nnoremap :cprevzz +nnoremap k :lnextzz +nnoremap j :lprevzz +nnoremap rr :%s/\<\<\>/\/gIzz +nnoremap x :!chmod +x % +nnoremap q :!go run % +nnoremap +nnoremap Sh szz +nnoremap Sv vzz +nnoremap Se =zz +nnoremap Sx :close +nnoremap lzz +nnoremap hzz +nnoremap jzz +nnoremap kzz +nnoremap + zz +nnoremap - zz +nnoremap 4< +nnoremap 4> +nnoremap 4+ +nnoremap 4- +nnoremap gsj :GoTagAdd json zz +nnoremap gsy :GoTagAdd yaml zz +nnoremap :bnextzz +nnoremap :bprevzz +nnoremap :bdeletezz +map (ActivateProjectToolWindow) +map sf (SearchEverywhere) +map f (ReformatCode) + + +" Visual mode mappings +vnoremap J :m '>+1gv=gv +vnoremap K :m '<-2gv=gv +vnoremap yy "+y +vnoremap dd "_d +