# remap
abbr k kubectl
abbr x extract
alias cp='cp -vir'
alias mv='mv -vi'
alias rm='rm -vr'
alias mkdir='mkdir -vp'
# alias ls='exa -lF --icons --sort=type'
# alias la='exa -laF --icons --sort=type'
# alias lt='exa --tree'
{% if multiplexer == 'tmux' %}
abbr tmux 'TERM=screen-256color command tmux'
{% endif %}

# neovim
abbr v nvim
abbr vi 'fzf --prompt "Edit files: " --preview "$HOME/.local/libexec/preview {} 2>/dev/null" | xargs -r nvim'

# emacs
alias doom='$HOME/.config/emacs/bin/doom'
abbr e 'emacs -nw'
abbr em 'emacsclient -c -a "emacs"'

# rsync
abbr rsyncdir 'rsync -avP --delete-after'

# yt-dlp
abbr yoump3 'yt-dlp --extract-audio --audio-format mp3 --embed-thumbnail --audio-quality 0'
abbr youflac 'yt-dlp --extract-audio --audio-format flac --audio-quality 0'
abbr youlist 'yt-dlp --yes-playlist'

# Lazy cd-ing
function ..   ; cd .. ; end
function ...  ; cd ../.. ; end
function .... ; cd ../../.. ; end

# Create directory path and cd into it
function mkcd; mkdir -p $argv; cd $argv; end

# Create file, recursively creating directories as needed
function mktouch; mkdir -p (dirname $argv); touch $argv; end
