Found a new way to edit my hosts file while normally I would use vi this means that I can use TextEdit which sometimes is easier.
Open the Terminal:
Applications > Utilities > Terminial
Type the following and hit enter:
sudo open -e /etc/hosts
Or if you fancy vi then:
sudo vi /etc/hosts