Hey folks,
I am trying to set-up ST2 to insert curly brackets end of line, enter a line break, insert closing curly bracket and then move cursor up a line and then enter automatically, when I press “{”.
Basically “{” -> “{
[tab] |
}”
where “|” represents cursor. I could enter the two curly brackets by the key binding and the .macro:
{ "command": "move_to", "args": {"to": "eol"} },
{ "command": "insert_snippet", "args": {"contents": "${TM_LINE_TERMINATOR:{}\n\n}"} }
]
But I do not know how to move the cursor up one line and then insert a tab. Could anyone give a suggestion? Much appreciated.