Add a vim option select
This commit is contained in:
parent
ab6350f15a
commit
3636fb6d07
@ -1,7 +1,5 @@
|
|||||||
#{- ~/.aliases -}#
|
#{- ~/.aliases -}#
|
||||||
|
|
||||||
alias vim="nvim "
|
|
||||||
|
|
||||||
#{- FILE OPERATIONS -}#
|
#{- FILE OPERATIONS -}#
|
||||||
|
|
||||||
# Allow alias expansion for commands executed with sudo
|
# Allow alias expansion for commands executed with sudo
|
||||||
@ -40,6 +38,7 @@ alias df="df -h"
|
|||||||
alias du="du -sh"
|
alias du="du -sh"
|
||||||
|
|
||||||
# History searches
|
# History searches
|
||||||
|
alias phistory='cat ${PERSISTENT_HISTFILE}'
|
||||||
alias hgrep='history | grep --color'
|
alias hgrep='history | grep --color'
|
||||||
alias phgrep="cat ${PERSISTENT_HISTFILE} | grep --color"
|
alias phgrep="cat ${PERSISTENT_HISTFILE} | grep --color"
|
||||||
|
|
||||||
|
|||||||
@ -21,3 +21,13 @@ cat_with_newline()
|
|||||||
cat "$@" && echo
|
cat "$@" && echo
|
||||||
}
|
}
|
||||||
alias cat="cat_with_newline"
|
alias cat="cat_with_newline"
|
||||||
|
|
||||||
|
vim_option_select()
|
||||||
|
{
|
||||||
|
if which nvim &> /dev/null; then
|
||||||
|
nvim "$@"
|
||||||
|
else
|
||||||
|
vim "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
alias vim="vim_option_select "
|
||||||
|
|||||||
@ -7,8 +7,8 @@ if [ -f /etc/os-release ]; then
|
|||||||
echo "Idenitfying OS to install GNU stow..."
|
echo "Idenitfying OS to install GNU stow..."
|
||||||
if grep -q -i debian /etc/os-release; then
|
if grep -q -i debian /etc/os-release; then
|
||||||
echo "You've got Debian!";
|
echo "You've got Debian!";
|
||||||
sudo apt update;
|
sudo apt-get update;
|
||||||
sudo apt install -y stow;
|
sudo apt-get install -y stow;
|
||||||
elif grep -q -i rhel /etc/os-release || grep -q -i fedora /etc/os-release; then
|
elif grep -q -i rhel /etc/os-release || grep -q -i fedora /etc/os-release; then
|
||||||
echo "You've got RedHat (or maybe Fedora)! Which is unsupported right now sorry!";
|
echo "You've got RedHat (or maybe Fedora)! Which is unsupported right now sorry!";
|
||||||
# sudo yum install -y stow;
|
# sudo yum install -y stow;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user