diff --git a/.config/nvim/init/plug.vim b/.config/nvim/init/plug.vim index 7549ea3..40a4e0d 100644 --- a/.config/nvim/init/plug.vim +++ b/.config/nvim/init/plug.vim @@ -19,7 +19,7 @@ Plug 'bkad/CamelCaseMotion' " move through camel case words " commands Plug 'inkarkat/vim-ReplaceWithRegister' " gr to replace with register Plug 'tpope/vim-commentary' " gc to comment out (gcap for paragraph) -Plug 'junegunn/vim-easy-align' " ga to align stuff +Plug 'junegunn/vim-easy-align' " gaip*= - align in paragraph all equal signs xmap ga (EasyAlign) nmap ga (EasyAlign) " libs diff --git a/.config/shell/functions b/.config/shell/functions index f679258..8c2e1c7 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -10,6 +10,7 @@ alias -g L="--color=always | ${PAGER:-less}" fi alias h='help' +compdef help=which alias info='info --vi-keys' d() { cd $(zf "$@") } @@ -30,7 +31,6 @@ ulimit -c unlimited # Enable core dumps which lsb_release >/dev/null && export DIST=$(lsb_release --id | cut -d' ' -f2) || true -compdef help=info unalias rd 2>/dev/null rd() { for f in "$@" @@ -58,14 +58,14 @@ wh() { compdef wh=which alias calc='rlwrap -a bc -l' +alias logoff="loginctl terminate-user $USER" +blues() { bluedevil-sendfile $(echo "$@" | xargs -n 1 realpath | xargs -n 1 echo -n " --files") } alias j='jrnl' jn() { jrnl -to today "$@" | bat --style=plain --pager="less +G" } compdef jn=jrnl alias jnc='jn -contains' -alias logoff="loginctl terminate-user $USER" - # Some aliases alias edgrub='sudoedit /etc/default/grub && sudo update-grub' alias edenv='sudoedit /etc/environment' diff --git a/.local/bin/scripts/st-diff b/.local/bin/scripts/st-diff index ee02542..6c5076e 100755 --- a/.local/bin/scripts/st-diff +++ b/.local/bin/scripts/st-diff @@ -22,5 +22,5 @@ if test "$#" -gt 0 fi else find "$DATA/2-standards/notes/journal" -name "intentions*sync-conflict*" -exec sh -c 'basename {} | cut -d. -f1 | xargs -i% jrnl % --import --file {}' \; -delete - find -name '*sync-conflict*' -exec st-diff $quick '{}' \; + find -name '.stfolder' -prune -o -name '*sync-conflict*' -exec st-diff $quick '{}' \; fi diff --git a/.local/bin/scripts/zf b/.local/bin/scripts/zf index e5faed9..a8e5543 100755 --- a/.local/bin/scripts/zf +++ b/.local/bin/scripts/zf @@ -7,7 +7,7 @@ set -o noglob query=$(zoxide query -sl "$@") # First find out whether there is an obvious match (score at least ten times that of runner-up) # If not select with fzf, using locate to find extra options -( expr $(echo "$query" | sed 'N;s|/.*\n|> 10 *|;q' | sed 's| */.*||') >/dev/null && +( expr $(echo "$query" | sed 'N;s|/.*\n|> 10 *|;q' | sed 's| */.*||') >/dev/null 2>&1 && echo "$query" | head -1 || ( echo "$query"; locate --basename --existing "$@" | while read -r file; do test -d "$file" && echo "$file"; done | sed 's/^/ 0 /' ) | fzf -0 -1 -n2.. --tiebreak=index --preview="ls -a --color --human-readable --group-directories-first --file-type {2..}" --preview-window=20% ) | tr -s ' ' | cut -d' ' -f3-