rc/{bash,zsh]: alias vim to nvim

Resolves: #151
This commit is contained in:
Aminda Suomalainen 2023-02-15 13:47:57 +02:00
parent b2b2689296
commit 96081bb9b0
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
3 changed files with 17 additions and 3 deletions

View File

@ -1 +1 @@
export EDITOR=vim # MIKAELA_GREP MIKAELA_GREPENVIRONMENT export EDITOR=nvim # MIKAELA_GREP MIKAELA_GREPENVIRONMENT

View File

@ -182,7 +182,7 @@ fi
# Things after this are just examples and should be put to some other file, which is sourced above. # Things after this are just examples and should be put to some other file, which is sourced above.
# Sets the default editor. # Sets the default editor.
#export EDITOR=vim # MIKAELA_GREP MIKAELA_GREP_ENVIRONMENT #export EDITOR=nvim # MIKAELA_GREP MIKAELA_GREP_ENVIRONMENT
# Set TZ to local timezone for sending over SSH # Set TZ to local timezone for sending over SSH
TZ=$(date +%Z) TZ=$(date +%Z)
@ -536,6 +536,13 @@ fi
# More simple SSH file signing, ~/.ssh/signingkey.pub should be a symlink # More simple SSH file signing, ~/.ssh/signingkey.pub should be a symlink
alias ssh-sign-file="ssh-keygen -Y sign -f ~/.ssh/signingkey.pub -n file" alias ssh-sign-file="ssh-keygen -Y sign -f ~/.ssh/signingkey.pub -n file"
# I use nvim, while I keep running vim instead
if hash nvim 2>/dev/null; then
alias vim="echo 'using nvim instead' && nvim"
else
alias vim="echo 'nvim not found' && \vim"
fi
# Allow custom aliases to be put in .aliases or .bash_aliases . # Allow custom aliases to be put in .aliases or .bash_aliases .
# .aliases # .aliases

View File

@ -139,7 +139,7 @@ export TERM=screen-256color
fi fi
# Sets the default editor. # Sets the default editor.
#export EDITOR=vim # MIKAELA_GREP MIKAELA_GREP_ENVIRONMENT #export EDITOR=nvim # MIKAELA_GREP MIKAELA_GREP_ENVIRONMENT
# Set TZ to local timezone for sending over SSH # Set TZ to local timezone for sending over SSH
TZ=$(date +%Z) TZ=$(date +%Z)
@ -513,6 +513,13 @@ fi
# More simple SSH file signing, ~/.ssh/signingkey.pub should be a symlink # More simple SSH file signing, ~/.ssh/signingkey.pub should be a symlink
alias ssh-sign-file="ssh-keygen -Y sign -f ~/.ssh/signingkey.pub -n file" alias ssh-sign-file="ssh-keygen -Y sign -f ~/.ssh/signingkey.pub -n file"
# I use nvim, while I keep running vim instead
if hash nvim 2>/dev/null; then
alias vim="echo 'using nvim instead' && nvim"
else
alias vim="echo 'nvim not found' && \vim"
fi
# Allow custom aliases to be put in .aliases or .zsh_aliases . # Allow custom aliases to be put in .aliases or .zsh_aliases .
# .aliases # .aliases