Wednesday, April 30, 2014

Setting JAVA_HOME for OSX Mavericks


I have a copy of Oracle JDK 7 installed in my system.

Downloaded Maven2 from Homebrew and realized that Java_Home wasn't set correctly.

The fix:

To get the correct path, you will need to execute /usr/libexec/java_home to obtain the path.

To automatically set JAVA_HOME in terminal every time, append

export JAVA_HOME=`/usr/libexec/java_home`

to the end of ~/.bash_profile

You should be able to execute mvn in a new terminal.

Friday, April 25, 2014

Activate Go Syntax highlighting for VIM in Ubuntu 14.04

This seems to be the shortest step to enable Go's syntax highlighting out of the box on Ubuntu 14.04 server.

I haven't tried the desktop edition but it should be similar.


Install  vim-syntax-go

sudo apt-get install vim-syntax-go


Create the .vim directory in your home directory



mkdir .vim
mkdir ~/.vim/syntax
cp /usr/share/vim/addons/syntax/go.vim ~/.vim/syntax/   
mkdir ~/.vim/ftdetect 
cp /usr/share/vim/addons/ftdetect/gofiletype.vim ~/.vim/ftdetect/