update config by referring dotfiles.github.io and http://net.tutsplus.com/tutorials/tools-and-tips/setting-up-a-mac-dev-machine-from-zero-to-hero-with-dotfiles/
Merge branch 'master' of https://github.com/wanghaidong/dotfiles

* 'master' of https://github.com/wanghaidong/dotfiles:
  fixed using local keyword out of function