Set cursor position for snippets