···11+[ keybindings ]
22+33+# Alt + S
44+state = \es
55+66+# Alt + E
77+stage = \ee
88+99+# Ctrl + E
1010+unstage = \ce
1111+1212+# Alt + M
1313+show = \em
1414+1515+# Alt + C
1616+commit-all = \ec
1717+1818+# Alt + D
1919+pull = \ed
2020+2121+# Alt + P
2222+push = \ep
2323+2424+# Alt + U
2525+upstream = \eu
2626+2727+# Alt + L
2828+logs = \el
2929+3030+# Alt + F
3131+feature = \ef
3232+3333+# Alt + H
3434+hotfix = \eh
···11+function cdb --description 'cd to the base directory of a file'
22+ isatty || read -az stdin && set -a argv $stdin
33+ cd (dirname $argv)
44+end
+4
fish/.config/fish/functions/choco.fish
···11+# Defined via `source`
22+function choco --wraps=choco.exe --description 'alias choco=choco.exe'
33+ choco.exe $argv;
44+end
+3
fish/.config/fish/functions/cm.fish
···11+function cm --wraps=chezmoi --description 'alias cm chezmoi'
22+ chezmoi $argv;
33+end
+20
fish/.config/fish/functions/dedupevar.fish
···11+function dedupevar --description 'Remove duplicates from environment variable'
22+ if test (count $argv) = 1
33+ set -l newvar
44+ set -l count 0
55+ for v in $$argv
66+ if contains -- $v $newvar
77+ set count (math $count+1)
88+ else
99+ set newvar $newvar $v
1010+ end
1111+ end
1212+ set $argv $newvar
1313+ test $count -gt 0
1414+ and echo Removed $count duplicates from $argv
1515+ else
1616+ for a in $argv
1717+ dedupevar $a
1818+ end
1919+ end
2020+end
···11+-- fix blinking cursor after exiting Neovim in Windows Terminal
22+vim.cmd('au VimLeave * set guicursor=a:block-blinkon1')
33+44+-- press q to close help
55+vim.cmd('au FileType help nmap <silent> <buffer> q :q<CR>')
66+77+-- detect jsonnet files
88+vim.cmd('au BufRead,BufNewFile *.jsonnet,*.libsonnet set filetype=jsonnet')
99+1010+-- vim.cmd('au FileType c set tabstop=4<CR>')