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).
Does not equal this:
But this is pretty close:
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:
- Download the powerlevel9k.zsh-theme file
- Move the theme file to C:\Users\[username]\.babun\cygwin\home\[username]\.oh-my-zsh\custom.
- Navigate to C:\Users\[username]\.babun\cygwin\home\[username].
- Open .zshrc in your favorite text editor.
- 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.
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:
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:
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:
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.
That should ensure you have proper syntax highlighting in your terminal.
Random Useful Links: