diff --git a/fish/conf.d/abbr.fish b/fish/conf.d/abbr.fish new file mode 100644 index 0000000..6fad334 --- /dev/null +++ b/fish/conf.d/abbr.fish @@ -0,0 +1,27 @@ +abbr -a d 'docker' +abbr -a e 'edit' +abbr -a h 'history' +abbr -a k 'kubectl' +abbr -a l 'less' +abbr -a m 'minikube' +abbr -a n 'nerdctl' +abbr -a p 'podman' + +# Git abbreviations +abbr -a g 'git' +abbr -a ga 'git add' +abbr -a gb 'git branchsort' +abbr -a gbd 'git branch -D' +abbr -a gc 'git commit' +abbr -a gco 'git checkout' +abbr -a gcp 'git cherry-pick' +abbr -a gd 'git diff' +abbr -a gdc 'git diff --cached' +abbr -a gdh 'git diff --cached HEAD~' +abbr -a gf 'git fetch --prune' +abbr -a gl 'git logsearch -10' +abbr -a glo 'git log --oneline -10' +abbr -a gr 'git restore' +abbr -a gs 'git status' +abbr -a gst 'git stash' +abbr -a gsw 'git switch' diff --git a/fish/conf.d/fzf.fish b/fish/conf.d/fzf.fish index 3667327..d033875 100644 --- a/fish/conf.d/fzf.fish +++ b/fish/conf.d/fzf.fish @@ -15,7 +15,7 @@ function __fzf_files fzf \ --ansi \ --preview='bat --style=numbers --color=always {}' \ - --preview-window='right,70%,wrap,hidden,<200(bottom,50%)' \ + --preview-window='right,70%,wrap,hidden,<200(bottom,50%,hidden)' \ --bind='?:toggle-preview' \ --expect='ctrl-e' \ --header='ctrl-e to edit, ? to preview' @@ -44,7 +44,7 @@ function __fzf_git_log --ansi \ --tiebreak=index \ --preview='git show {2} | delta' \ - --preview-window='right,70%,wrap,hidden,<200(bottom,50%)' \ + --preview-window='right,70%,wrap,hidden,<200(bottom,50%,hidden)' \ --bind='?:toggle-preview' \ --header='? to preview' ) diff --git a/fish/config.fish b/fish/config.fish index 27c8d6b..04c2c15 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -57,35 +57,6 @@ end if not set -q __universals_initialized set -U __universals_initialized - # Abbreviations - abbr -a -U d 'docker' - abbr -a -U e 'edit' - abbr -a -U h 'history' - abbr -a -U k 'kubectl' - abbr -a -U l 'less' - abbr -a -U m 'minikube' - abbr -a -U n 'nerdctl' - abbr -a -U p 'podman' - - # Git abbreviations - abbr -a -U g 'git' - abbr -a -U ga 'git add' - abbr -a -U gb 'git branchsort' - abbr -a -U gbd 'git branch -D' - abbr -a -U gc 'git commit' - abbr -a -U gco 'git checkout' - abbr -a -U gcp 'git cherry-pick' - abbr -a -U gd 'git diff' - abbr -a -U gdc 'git diff --cached' - abbr -a -U gdh 'git diff --cached HEAD~' - abbr -a -U gf 'git fetch --prune' - abbr -a -U gl 'git logsearch -10' - abbr -a -U glo 'git log --oneline -10' - abbr -a -U gr 'git restore' - abbr -a -U gs 'git status' - abbr -a -U gst 'git stash' - abbr -a -U gsw 'git switch' - # Colors set -U fish_color_autosuggestion a5a5a9 set -U fish_color_cancel -r diff --git a/fish/functions/diff.fish b/fish/functions/diff.fish index 707d858..7b7181b 100644 --- a/fish/functions/diff.fish +++ b/fish/functions/diff.fish @@ -1,3 +1,3 @@ function diff - command diff -u $argv[1] $argv[2] | delta + command diff --unified $argv | delta end