From 23c219fd2a7f16f1affeb214c9f49b7c935a9c8d Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Mon, 21 Oct 2024 06:02:48 -0600 Subject: feat: add aliases, update nvim, fix tmux term/colors --- .config/nvim | 2 +- .config/shell/aliasrc | 27 +++++++++++++++++++++++++++ .config/tmux/tmux.conf | 9 ++++----- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/.config/nvim b/.config/nvim index a50a5f5..67d76fd 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit a50a5f55ae3af9493f76f0aae8a53167eaee79e1 +Subproject commit 67d76fd18c0af3f00d9c55f82597401116a456fa diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index ef97b3a..361da2e 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -24,6 +24,33 @@ fi alias grep="grep --color=auto" alias diff="diff --color=auto" +# +# git related +# +# base +alias gs="git status" +alias gf="git fetch --all --prune" + +# add +alias ga="git add" +alias gap="git -c interactive.diffFilter='git diff --color=always --word-diff' add -p" + +# commit +alias gc="git commit" +alias gca="gc --amend" +alias gcane="gca --no-edit" + +# log +alias gl="git log --graph --all" +alias glol="git log --graph --decorate --pretty=oneline --abbrev-commit" +alias glola="glol --all" + +# diff +alias gd="git diff --color-words='[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+'" +alias gds="gd --staged" +# not really helpful +# alias gd="git diff --color-words=." + # dotfiles bare repository management # shellcheck disable=SC2139 alias dots="/usr/bin/git --git-dir=$HOME/.mdots/ --work-tree=$HOME" diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index fd5d4cd..b20e0e1 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -3,11 +3,10 @@ set -g mouse on # required so 0;10;1c doesn't appear when starting tmux set -sg escape-time 50 -# fix Colors -# https://www.reddit.com/r/neovim/comments/uanvdw/neovimtmux_color_problem/ -# https://github.com/SmiteshP/Dotfiles/blob/946cde45d8349d50446629939cebd7e4091a3775/.tmux.conf#L3 -set -g default-terminal "screen-256color" -set -as terminal-features ",xterm-256color:RGB" +# Fix colors and italic/bold (found with :checkhealth on nvim) +set -g default-terminal "tmux-256color" +set-option -a terminal-features 'xterm-256color:RGB' + ### some configs ### from https://jdhao.github.io/2018/09/30/tmux_settings_for_vim_users/ -- cgit v1.2.3-70-g09d2