Sunday, April 13, 2014

From Windows to Mac Part 1

or... How to be happy as a (java/scala) developer on your new fresh  Mac

Parts (one, two, three)

Although I have been using Apple Macintosh since 1994 (and NEXT) I have been mainly using Windows for developing and Mac for some home development and entertainment systems.

This is the tools I have started to use during my first months.

Terminal 

The most important thing first - the terminal. For a terminal I use ITerm 2, a terminal replacement that has some great features. Most importently a good fullscreen mode with tmux like split-panes  Split panes is a great thing when you are compiling/checking logs in different windows at the same time. This is great for development and operations work. 


Usually I have a full screen with three or so panes so I can se build status, logs at the same time.


ITerm shortcuts from Cheatsheet

It is also simple to move focus between the windows with the keyboard or mouse. I show some of these commands in the video below, for example:  Shift-⌘-Enter⏎. enlarges the current windows to maxsize,   

Fonts

The fonts I mainly use (for coding and console applications) are:

Keyboard setup

To modify the default keyboard you can use Ukelele. Ukelele is a Unicode Keyboard Layout Editor for Mac OS X versions 10.2 and later.

I have a Swedish keyboard and I hava remapped some of the keys and removed the dead-key sequences for ^ and ~. I started with this keymap from Martin Wernestål  and I have remapped the caps-lock key as per A useful Caps Lock key

Mouse acceleration

Standard mouse acceleration on OS X is not great, SmoothMouse for OS X solves that problem. 

The Package manager

I use Homebrew and Appstore as package managers

Note that Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike.

Installed brews 

These are my installed brews, I wont go into detail about them but have a look at the bold linked ones, you should have a look at if you don't know about hem already. Install with:
$ brew install <brew>

The following is a gist with my current "brews"



The Shell

I use Zsh with oh-my-zsh installed. I do not have so many specific settings but the below are the ones I have in my zshrc: 


ZSH_THEME="bureau"
plugins=(git brew tmux scala sbt github gradle mvn screen vi-mode java )
 #Jdk versions
alias setjdk16='export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)'
alias setjdk17='export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)'
alias setjdk18='export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)'
setjdk17
# http://superuser.com/questions/417627/oh-my-zsh-history-completion
bindkey '\e[A' history-beginning-search-backward
bindkey '\e[B' history-beginning-search-forward


No comments: