support sublime text 3

I'm using sublime text 3, just made several changes to make this plugin to support ST3.


Hope this helps. I'm not testing much on ST2, so it may have bug.