Various updates

This commit is contained in:
Rob Watson 2021-06-18 15:13:57 +02:00
parent 66b7fc8f4b
commit 4a8dc1f1ea
5 changed files with 21 additions and 6 deletions

View File

@ -30,6 +30,7 @@
mr = !git merge $(git rb) mr = !git merge $(git rb)
mt = merge -s recursive -X theirs mt = merge -s recursive -X theirs
nb = checkout -b nb = checkout -b
nuke1 = reset --hard HEAD^
nuke = reset --hard nuke = reset --hard
p = push p = push
pf = push --force pf = push --force
@ -48,8 +49,11 @@
s = status s = status
shp = show -p shp = show -p
sq = merge --squash sq = merge --squash
sqt = merge --squash -s recursive -X theirs
ss = stash save ss = stash save
st = status st = status
sy = !gitsha1yank -s
sum = show --stat
undo = reset --soft HEAD^ undo = reset --soft HEAD^
sshp = stash show -p sshp = stash show -p
[user] [user]

12
script/gitsha1yank Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
#
# Copy the last Git SHA1 to the clipboard
set -e
if [ "$1" == "-s" ]; then
args="--short"
fi
# TODO: fix for non-Darwin
git rev-parse $args HEAD | tr -d '\n' | pbcopy

3
vimrc
View File

@ -368,8 +368,7 @@ augroup lsp_install
au! au!
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
autocmd User lsp_diagnostics_updated call lightline#update() autocmd User lsp_diagnostics_updated call lightline#update()
autocmd BufWritePre *.go silent LspDocumentFormatSync " autocmd BufWritePre *.go silent LspDocumentFormatSync
autocmd BufWritePre *.go silent LspCodeActionSync source.organizeImports
" autocmd CursorHold <buffer> silent LspHover " autocmd CursorHold <buffer> silent LspHover
augroup END augroup END

2
zshenv
View File

@ -9,7 +9,7 @@ export VISUAL="vim"
# ZSH: # ZSH:
export ZDOTDIR="$XDG_CONFIG_HOME/zsh" export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export HISTFILE="$ZDOTDIR/.zsh-history" export HISTFILE="$ZDOTDIR/.zsh_history"
export HISTSIZE=100000 export HISTSIZE=100000
export SAVEHIST=100000 export SAVEHIST=100000
export HISTTIMEFORMAT="[%F %T] " export HISTTIMEFORMAT="[%F %T] "

6
zshrc
View File

@ -86,9 +86,9 @@ alias sc="systemctl"
alias sk="setkeys" alias sk="setkeys"
alias ssc="sudo systemctl" alias ssc="sudo systemctl"
alias sysc="systemctl" alias sysc="systemctl"
alias rggo="rg -g '*\.go' -g '!vendor/'" alias rgo="rg -g '*\.go' -g '!vendor/'"
alias rggs="rg -g '*\.go' -g '!vendor/' -g '!*_test.go'" alias rgs="rg -g '*\.go' -g '!vendor/' -g '!*_test.go'"
alias rggt="rg -g '*\_test.go' -g '!vendor/'" alias rgt="rg -g '*\_test.go' -g '!vendor/'"
alias tm="tmux attach" alias tm="tmux attach"
alias tmd="tmux new -s default -c $HOME || tmux attach -t default" alias tmd="tmux new -s default -c $HOME || tmux attach -t default"
alias tms="tmuxsess" alias tms="tmuxsess"