Forgot to write a comment that this is taken from https://github.com/sergeche/emmet-sublime/blob/master/editor.js#L119-L171
wanted to keep this the same in case we decide to add `insert_final_tabstop` option