dotfiles/fish/config.fish

71 lines
1.2 KiB
Fish
Raw Normal View History

2021-03-14 18:12:50 +01:00
# activate usable-mode
fish_vi_key_bindings
# ALIASES
alias ls="lsd"
alias ll="ls -l"
alias la="ll -a"
2021-04-13 01:06:56 +02:00
alias lt="ll --tree"
2021-03-14 18:12:50 +01:00
alias clip="xclip -sel clip"
2021-04-13 01:06:56 +02:00
alias nv="nvim"
2021-07-04 20:09:21 +02:00
alias nvide="rbg neovide --multiGrid --"
2021-07-18 18:46:24 +02:00
alias diff="nvim -d"
2021-04-13 01:06:56 +02:00
2021-03-14 18:12:50 +01:00
function rbg
$argv &>/dev/null&
end
2021-03-27 18:56:46 +01:00
function rbgd
rbg $argv
disown
end
2021-04-13 01:06:56 +02:00
function foreachdir
for file in (find $argv[1] -type f -print)
f=$file eval $argv[2..-1]
end
end
2021-03-14 18:12:50 +01:00
function !!
eval $history[1]
end
function mkdircd
mkdir $argv[1]
cd $argv[1]
end
2021-04-13 01:06:56 +02:00
function ifpresent
if which $argv[1] &> /dev/null
eval $argv[2..-1]
end
end
function todos
rg -i -H todo
end
2021-03-14 18:12:50 +01:00
# ENV
export CXX=clang++
export EDITOR=nvim
2021-04-13 01:06:56 +02:00
export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:/var/lib/snapd/snap/bin:$HOME/go/bin"
# initialization stuff
ifpresent starship 'starship init fish | source'
ifpresent zoxide 'zoxide init fish | source'
ifpresent cod 'cod init %self fish | source'
ifpresent opam 'eval (opam env)'
2021-04-16 01:44:39 +02:00
ifpresent navi 'navi widget fish | source'
2021-03-14 18:12:50 +01:00
2021-06-22 21:04:42 +02:00
# fw init
if which fw &> /dev/null
if test -x (command -v fw)
if test -x (command -v fzf)
fw print-fish-setup -f | source
else
fw print-fish-setup | source
end
end
2021-06-22 21:04:42 +02:00
end