From f1c6dceb42042ffe05a0162cfddd4a87e5b99fd4 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Wed, 8 Apr 2026 13:47:23 +0200 Subject: [PATCH 1/3] gitconfig: Add aliases push-softly, stash-bttf, rebase-c --- .config/git/config.inc/common.gitconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/git/config.inc/common.gitconfig b/.config/git/config.inc/common.gitconfig index 5d3c504..bfe6e16 100644 --- a/.config/git/config.inc/common.gitconfig +++ b/.config/git/config.inc/common.gitconfig @@ -67,12 +67,20 @@ # Push with ci.skip option (probably only works with GitLab) push-skip-ci = push -o ci.skip + # Push with --force-with-lease, like force push but less risky. Should be used after a rebase. + push-softly = push --force-with-lease + # "back to the future": switch to default branch and pull + # TODO: Add `git stash push/pop`, but only if there actually is something to stash... not quite sure how bttf = "!f() { DEFAULT=$(git default-branch); git switch ${1-$DEFAULT} && git pull --rebase --prune; }; f" + stash-bttf = !git stash && git bttf && git stash pop # Reset HEAD to last commit, but keep files as they are uncommit = reset HEAD~1 --mixed + # Shortcut for rebase --continue + rebase-c = rebase --continue + # Stash changes, pull and pop stash again stash-pull = !git stash && git pull && git stash pop From bec5fb208499519a06b7c0347e4816b589ccb054 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Wed, 8 Apr 2026 13:50:05 +0200 Subject: [PATCH 2/3] vimrc: Remove smarttab setting --- .vimrc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.vimrc b/.vimrc index 5d48566..1e91ac6 100644 --- a/.vimrc +++ b/.vimrc @@ -15,7 +15,6 @@ set smartcase " Indentation options (yeah let's switch to spaces instead of tabs I guess...) set autoindent set expandtab -set smarttab set shiftwidth=4 set tabstop=4 set softtabstop=4 @@ -27,14 +26,8 @@ filetype plugin on autocmd BufNewFile,BufRead *.gitconfig set syntax=gitconfig autocmd BufNewFile,BufRead *.rasi set syntax=scss -" Indentation for Python (use 4 spaces) -"autocmd FileType python setlocal expandtab shiftwidth=4 softtabstop=4 -autocmd FileType yml,yaml setlocal ts=2 sts=2 sw=2 expandtab - -" Indentation (don't remove tabs from empty lines) -"inoremap x -"nnoremap o ox -"nnoremap O Ox +" Indentation for YAML (use 2 spaces) +autocmd FileType yml,yaml setlocal sts=2 sw=2 " Mouse settings set mouse=a @@ -142,7 +135,7 @@ inoremap l " Unindent with Shift-Tab inoremap << -" Copy and to X clipboard (Ctrl-C in visual mode and Ctrl-V in insert mode) +" Copy to and paste from X clipboard (Ctrl-C in visual mode and Ctrl-V in insert mode) vmap "+y imap "+P From 2ef36eb976b764d9669e8243011c5bbe0929c650 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Wed, 8 Apr 2026 13:51:15 +0200 Subject: [PATCH 3/3] bashrc: Add commands to history immediately --- .bashrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index d69d7b3..9ac27dc 100644 --- a/.bashrc +++ b/.bashrc @@ -11,9 +11,10 @@ set -o noclobber shopt -s checkwinsize shopt -s histappend HISTCONTROL=ignoreboth -HISTSIZE=20000 -HISTFILESIZE=20000 +HISTSIZE=10000 +HISTFILESIZE=100000 PROMPT_DIRTRIM=3 +PROMPT_COMMAND+=('history -a') # Save and display timestamps for history HISTTIMEFORMAT="[%F %T] "