I am using sublime text 3. There is no auto complete suggestion for else and elif in python.
So I started writing a snippet for else first.
<snippet> <tabTrigger>else</tabTrigger> <scope>source.python</scope> <description>Else Condition</description> <content><![CDATA[ else: ${1} ]]></content> </snippet>
Generally when I type else I will be inside if block.
when I use the snippet I wrote, it is indenting improperly as shown in the first half of the below image.
But I want it to indent correctly as shown in the second half of the above image.
I tried searching in sublime forums and else where on the internet but could not find a similar issue like this.
How can I write a snippet so that the else block indents correctly?