Implementation of https://github.com/jrowny/brackets-snippets/issues/46