From 7866c961fb5886af5b713518843cabd3a5c249ee Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Tue, 4 Oct 2022 11:47:52 -0500 Subject: [PATCH] a bunch of git tweaks --- .bash_profile | 1 + .bashrc | 1 + .vimrc | 47 ++++++++++++++++++++++++++++++++++++----------- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/.bash_profile b/.bash_profile index d8b5cf3..6741762 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,3 +1,4 @@ if [[ -f "$HOME/.bashrc" ]]; then source "$HOME/.bashrc" fi +. "$HOME/.cargo/env" diff --git a/.bashrc b/.bashrc index 42cfffa..d28065d 100644 --- a/.bashrc +++ b/.bashrc @@ -98,3 +98,4 @@ fi export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +. "$HOME/.cargo/env" diff --git a/.vimrc b/.vimrc index 2802dd0..4516994 100644 --- a/.vimrc +++ b/.vimrc @@ -9,10 +9,12 @@ call vundle#begin() Plugin 'VundleVim/Vundle.vim' Plugin 'dense-analysis/ale' " asynchronous linting engine - Plugin 'tpope/vim-fugitive' " git integration that I never use + Plugin 'tpope/vim-fugitive' " integration with the git cli Plugin 'tpope/vim-surround' " edits surrounding quotes and parens and the like Plugin 'tpope/vim-rails' " rails project management stuff Plugin 'tpope/vim-repeat' " fixes the . key for ...something + " Plugin 'airblade/vim-gitgutter' " in-file git integration + Plugin 'mhinz/vim-signify' Plugin 'slim-template/vim-slim' " what in the 2008 is this Plugin 'kchmck/vim-coffee-script' " lol coffee script Plugin 'fatih/vim-go' " all-in-one Go tools @@ -39,9 +41,6 @@ call vundle#begin() " intended to improve NERDTree. " Plugin 'Xuyuanp/nerdtree-git-plugin' " - " I just don't like it any more - " Plugin 'airblade/vim-gitgutter' - " " Still figuring this one out. I think I hate it? " Plugin 'neoclide/coc.nvim' " @@ -270,7 +269,7 @@ let g:lightline = { \ ] \ }, \ 'component_function': { -\ 'gitbranch': 'fugitive#head', +\ 'gitbranch': 'FugitiveHead', \ 'llreadonly': 'LightlineReadonly' \ } \ } @@ -306,14 +305,40 @@ set number " Shortcut to show invisible characters nnoremap l :set list! -" leader ev to edit your vimrc -nnoremap ev :vsplit $MYVIMRC +" leader pe (prefs edit) to edit your vimrc +nnoremap pe :vsplit $MYVIMRC -" leader sv to source your vimrc -nnoremap sv :source $MYVIMRC +" leader ps (prefs source) to source your vimrc +nnoremap ps :source $MYVIMRC " leader ci inverts comment states on a line by line basis noremap ci NERDComInvertComment + +" ---------------------------------------------------------------------------}}} + +" Git -----------------------------------------------------------------------{{{ +let g:signify_disable_by_default = 1 + +" toggle the signify sign column on and off +nmap vs :SignifyToggle + +" toggle line-level highlighting in signify +nmap vl :SignifyToggleHighlight + +" diff the current file with signify +nmap vd :SignifyDiff + +nmap vc :Git commit +nmap vp :Git push +nmap va :Git add % + +nmap vj (signify-next-hunk) +nmap vk (signify-prev-hunk) + +omap ic (signify-motion-inner-pending) +xmap ic (signify-motion-inner-visual) +omap ac (signify-motion-outer-pending) +xmap ac (signify-motion-outer-visual) " ---------------------------------------------------------------------------}}} " Insert Mode ---------------------------------------------------------------{{{ @@ -472,8 +497,8 @@ set wrap " force line wrapping to only happen at word boundaries set linebreak -" wait 400ms after typing for updates (default is 4000) -set updatetime=400 +" wait 200ms after typing for updates (default is 4000) +set updatetime=200 " set current working directory on file enter set autochdir