Mike Lindegarde... Online

Things I'm likely to forget.

Developer Street Cred

Important Information in the Next Section...

Skip the story, take me to the instructions.

I did my share of text editor coding and command line / terminal compiling back in the day.  However, between 2004 and 2013 I was pretty much doing all of my programming in Visual Studio.  In 2013 I started using my Mac Mini and eventually my MacBook Pro to do some work.  That lead to using Eclipse and Android Studio for some Android development.  Than I started to play with Rails, Node.js, etc... 

Long story short, I realized the Windows command prompt doesn't compare to using the terminal on OS X (and of course Linux / Unix based distributions).

This:

Does not equal this:

But this is pretty close:

Getting There

I'm no expert when it comes to the different options available to Windows users (or terminals in general).  However, I can tell you what I did to at least improve my situation when working on a Windows box.

Step 1: Install Babun

Head over to the Babun homepage and following the instructions there.  Pretty straight forward.

Step 2: Find You Theme

I ended up going with the powerlevel9k theme for ZSH.  I used that as a starting point and made a few modifications from there.  You can either follow the instruction on the linked page or do the following:

  1. Download the powerlevel9k.zsh-theme file
  2. Move the theme file to C:\Users\[username]\.babun\cygwin\home\[username]\.oh-my-zsh\custom.
  3. Navigate to C:\Users\[username]\.babun\cygwin\home\[username].
  4. Open .zshrc in your favorite text editor.
  5. Make the following change:
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="babun"
ZSH_THEME="powerlevel9k"

I made a slight change to the default theme.  To do this, I created a copy of the file I downloaded it and renamed it to powerlevel9k-modified.zsh-theme.  I then changed one line in the file:

  local current_path='%C'

To see the change you'll need to once again edit your .zshrc file to reflect the "new" theme.

Step 3: Locate a Powerline font

You can find the Powerline fonts on GitHub.  I'm currently using DejaVu Sans Mono for Powerline.  Simply download and install the ttf file (double click on it once you've downloaded it).  You'll then need to edit your ~/.minttyrc file to use the font:

Font=DejaVu Sans Mono for Powerline

Step 4: Set You Color Scheme

I'm a fan of the Solarized color scheme.  You can find both the light and dark versions on GitHub.  I opted not to edit my config file.  Instead I created a ~/.solar folder and put the sol.dark file there.  You'll then need to add the following line to the end of your ~/.babunrc file:

source ~/.solar/sol.dark

Step 5: Enable Syntax Highlighting

Reading the most current documentation suggest this step may not be necessary; however, when I did my setup I had to do this:

cd ~/.oh-my-zsh/custom/plugins
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git

Then you'll need to edit your ~/.zshrc file as follows:

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(svn zsh-syntax-highlighting)
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) 

That should ensure you have proper syntax highlighting in your terminal.

Random Useful Links: