Skip to content

Mac_Terminal

bootstraponline edited this page May 2, 2016 · 38 revisions

iTerm2 & ZSH on Mac

  • Install iTerm2 beta via brew

    • brew install Caskroom/versions/iterm2-beta
  • Install solarized dark iTerm colors.

    • wget https://raw.github.com/altercation/solarized/master/iterm2-colors-solarized/Solarized%20Dark.itermcolors
    • iTerm2Preferences...ProfilesColorsColor Presets...Import
    • After importing, manually select Solarized Dark from the drop down list.
  • Install Oh My ZSH

    • sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • Edit ~/.zshrc and update:

    • ZSH_THEME="agnoster"
    • DEFAULT_USER="your_username"
    • plugins=(git)
  • Install powerline font

    • git clone https://github.com/powerline/fonts.git
    • cd fonts; ./install.sh
    • iTerm2Preferences...ProfilesTextChange FontMeslo LG M DZ Regular for Powerline

--

Custom alias.

Open the Command Palette in visual studio code then type shell command and click Shell Command: Install 'code' command in PATH

$ code ~/.oh-my-zsh/custom/custom.zsh
c=$HOME/code
alias o="code --disable-extensions --reuse-window"
alias zshconfig="o ~/.zshrc"
alias zshcustom="o $HOME/.oh-my-zsh/custom/custom.zsh"

reloadzsh() {
    source ~/.zshrc
}

ZSH Git Cheat Sheet

ZSH shortcuts:

  • Ctrl + U = Clear
  • Ctrl + A = Go to start
  • Ctrl + E = Go to end

Preferences → Profile → General → Working directory....


General usage tip:

  • Store code in ~/code. Make Alias on desktop so it's easy to reach via Finder.

Clone this wiki locally