imported work from bastien

Imported from http://www.gsmproductions.com/misc/sublime.html

Signed-off-by: Christian Ege <k4230r6@gmail.com>