diff --git a/bashrc b/bashrc index a3080b6..108c8cf 100644 --- a/bashrc +++ b/bashrc @@ -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) \[\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() { name=PS1$1 if [ -z $1 ] || [ -z "${!name}" ]; then