mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 03:09:22 +01:00
{bash,zsh}rc: turn vim alias into a function
Resolves: #160 Resolves: sudo vim
This commit is contained in:
parent
94c23e2f7d
commit
b4dd5794d2
20
rc/bashrc
20
rc/bashrc
@ -541,13 +541,6 @@ fi
|
||||
# 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"
|
||||
|
||||
# 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 .
|
||||
|
||||
# .aliases
|
||||
@ -814,6 +807,19 @@ ssh-verify-file() {
|
||||
ssh-keygen -Y verify -f $sshAllowedSigners -I $1 -n file -s $2.sig <$2
|
||||
}
|
||||
|
||||
# I use nvim, while I keep running vim instead
|
||||
if hash nvim 2>/dev/null; then
|
||||
vim() {
|
||||
echo 'using nvim instead'
|
||||
nvim $@
|
||||
}
|
||||
else
|
||||
vim() {
|
||||
echo 'nvim not found'
|
||||
\vim $@
|
||||
}
|
||||
fi
|
||||
|
||||
# Source files for miscannellious modifications.
|
||||
|
||||
# acme.sh
|
||||
|
19
rc/zshrc
19
rc/zshrc
@ -523,13 +523,6 @@ fi
|
||||
# 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"
|
||||
|
||||
# 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 .
|
||||
|
||||
# .aliases
|
||||
@ -800,6 +793,18 @@ ssh-verify-file () {
|
||||
ssh-keygen -Y verify -f $sshAllowedSigners -I $1 -n file -s $2.sig < $2
|
||||
}
|
||||
|
||||
# I use nvim, while I keep running vim instead
|
||||
if hash nvim 2>/dev/null; then
|
||||
vim() {
|
||||
echo 'using nvim instead'
|
||||
nvim $@
|
||||
}
|
||||
else
|
||||
vim() {
|
||||
echo 'nvim not found'
|
||||
\vim $@
|
||||
}
|
||||
fi
|
||||
|
||||
# Source files for miscannellious modifications.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user