Change vim alias to vi, also add a vif alias for opening vim with the result from fzf

This commit is contained in:
Martin Larsson 2024-05-25 02:15:15 +02:00
parent eaeb57e411
commit e4ba277522

View file

@ -77,7 +77,7 @@ zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
# Aliases
alias vim="nvim"
alias vi="nvim"
alias c="clear"
alias s="source"
alias sz="source ~/.zshrc"
@ -89,6 +89,11 @@ alias neofetch="fastfetch"
alias cat="bat"
alias fzf='fzf --preview "bat --color=always --style=numbers --line-range=:500 {}"'
# Alias functions
vif() {
nvim "$(fzf)"
}
# wl-copy and wl-paste doesn't exist on mac, and mac has pbcopy and pbpaste
if [[ "$(uname)" != "Darwin" ]]; then
alias wlc="wl-copy"