Handle Flatpak of Vim
This commit is contained in:
parent
54bdae46cf
commit
629a4f85b2
1 changed files with 18 additions and 9 deletions
|
@ -74,9 +74,26 @@ then
|
|||
export GPG_TTY=$(tty)
|
||||
fi
|
||||
|
||||
if test -x /usr/bin/vim
|
||||
# Set EDITOR to vim or vi.
|
||||
if test -x ${XDG_DATA_HOME:-$HOME/.local/share}/flatpak/app/org.vim.Vim/current/active/export/bin/org.vim.Vim
|
||||
then
|
||||
export EDITOR="${XDG_DATA_HOME:-$HOME/.local/share}/flatpak/app/org.vim.Vim/current/active/export/bin/org.vim.Vim -f"
|
||||
elif test -x /usr/bin/vim
|
||||
then
|
||||
export EDITOR="/usr/bin/vim -f"
|
||||
else
|
||||
export EDITOR=vi
|
||||
fi
|
||||
|
||||
# Alias vi to vim if it is installed.
|
||||
if test -x ${XDG_DATA_HOME:-$HOME/.local/share}/flatpak/app/org.vim.Vim/current/active/export/bin/org.vim.Vim
|
||||
then
|
||||
alias vi=${XDG_DATA_HOME:-$HOME/.local/share}/flatpak/app/org.vim.Vim/current/active/export/bin/org.vim.Vim
|
||||
elif test -x /usr/bin/vim
|
||||
then
|
||||
alias vi=/usr/bin/vim
|
||||
else
|
||||
alias vim=vi
|
||||
fi
|
||||
|
||||
if [ ${XDG_CURRENT_DESKTOP:-unknown} == GNOME ]
|
||||
|
@ -122,14 +139,6 @@ alias zlu="zypper list-updates"
|
|||
alias en="LANG=en_GB.UTF-8"
|
||||
alias fr="LANG=fr_FR.UTF-8"
|
||||
|
||||
# Alias vi to vim if it is installed.
|
||||
if [ -x /usr/bin/vim ]
|
||||
then
|
||||
alias vi=vim
|
||||
else
|
||||
alias vim=vi
|
||||
fi
|
||||
|
||||
# Alias dig to drill if dig is not installed.
|
||||
if [ -x /usr/bin/drill ] && ! [ -x /usr/bin/dig ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue