Once I have some basic essentials installed on my computer, it's time to start customizing my Bash Profile.

Here are the top 5 things I like to add on a fresh Bash.


I. Shortcuts to configuration files

I think it is important to make it very easy to edit your .bash_profile. So I like to make aliases to open up my various configuration files. I find that once it's easy to constantly open up these files, I tend to edit them more.

alias bb='vi ~/.bash_profile'
alias vv='vi ~/.vimrc'
alias tt='vi ~/.tmux.conf'

You can use any aliases you want, but I find these intuitive and easy to remember.


II. Easier Reloading of you .bash_profile

If we are going to be editing our .bash_profile all the time, it also should be easy to quickly reload our changes. I like the following alias for an easy reload.

alias rc="source ~/.bash_profile"

III. Simple clearing of screen

I like to clear my screen constantly (clear screen == clear mind). This particular shortcut is very ergonomical for me, because my right hand typically rests with my first finger near k and my pinky near Enter.

alias k='clear'

IV. VI mode in Bash

Once you get used to all the useful vim shortcuts in normal mode, it can be annoying to type on the command line without them. For this I like to keep vi mode on.

While useful, it can also be confusing to know which mode you are in. So just remember when you first switch, if something funny is happening when you're typing on the command line, just hit escape.

set -o vi

V. Easier changing directories

This is a trick that a co-worker showed me, and now I am addicted to. It lets you cd into a folder inside a designated folder without having to give the absolute path.

So for example if we have a folder called code with a couple projects like

code/project_1

you could cd into code/project_1 from /Users/keanureeves/hopes/dreams/wishes with just cd project_1

Just replace code in the following code to whatever folder you desire.

export CDPATH=.:"~/code:self"