Add vimswitch command to bashrc

This commit is contained in:
Talia 2020-07-17 13:26:43 +02:00
parent 4ef004e60c
commit 1d590a91ee
1 changed files with 13 additions and 0 deletions

13
bashrc
View File

@ -67,6 +67,19 @@ export PS1git='\[\033[00;30m\]$(numjobs ⚒)\[\033[00;30m\]$(gitprompt || dirs +
export PS1gitlong='\[\033[00;30m\]$(numjobs ⚒ ·)\[\033[00;30m\]$(gitprompt || dirs +0) \[\033[00;30m\]$(git log --oneline --no-decorate -1 2>/dev/null) export PS1gitlong='\[\033[00;30m\]$(numjobs ⚒ ·)\[\033[00;30m\]$(gitprompt || dirs +0) \[\033[00;30m\]$(git log --oneline --no-decorate -1 2>/dev/null)
\[\033[00;36m\]$(rlevel 🥆 ·)\[\033[00;36m\]$(gitpath)\[\033[00;31m\]» \[\033[00m\]' \[\033[00;36m\]$(rlevel 🥆 ·)\[\033[00;36m\]$(gitpath)\[\033[00;31m\]» \[\033[00m\]'
vimswitch() {
if [ -z "$EXPANDTAB" ]
then
export EXPANDTAB=yes
export TABSTOP=2
echo -e "Vim switched to \033[01;32mSpaces\033[00m mode"
else
unset EXPANDTAB
unset TABSTOP
echo -e "Vim switched to \033[01;35mTabs\033[00m mode"
fi
}
prompt() { prompt() {
name=PS1$1 name=PS1$1
if [ -z $1 ] || [ -z "${!name}" ]; then if [ -z $1 ] || [ -z "${!name}" ]; then