[IDE-AutoComplete] - Add 'EndIf' if insert twice for 'Else'

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

[IDE-AutoComplete] - Add 'EndIf' if insert twice for 'Else'

Post by skywalk »

Add to IDE-Preferences-AutoComplete:
[x] Add Matching 'End' keyword if insert is pressed twice.

Now...

Code: Select all

IfEndif     ;<-- Enter* twice
Add Matching 'End' keyword for 'Else' and 'ElseIf' if insert is pressed twice.

Code: Select all

If          ;<-- Enter* once
ElseEndIf   ;<-- Enter* twice
If          ;<-- Enter* once
ElseIfEndIf ;<-- Enter* twice
Saves more keystrokes :wink:
*I set my Preferences-ShortCuts-Insert the selected AutoComplete word. -> Return(Not Tab)
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum