Add yasnippet and compile-hook

Add yasnippet with some custom snippets and a hook that will close the
compile buffer when there are no errors