Add vimswitch command to bashrc
This commit is contained in:
parent
4ef004e60c
commit
1d590a91ee
1 changed files with 13 additions and 0 deletions
13
bashrc
13
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
|
||||
|
|
Loading…
Reference in a new issue