You should be looking at script that handles specific abbreviation. For IFELSE/DOCASE and some others it's '{stmthandler}'. Below is relevant piece of code from the script. As you can see 'lcSpace' holds whatever whitespace was in the line before abbreviataion you entered so replacemend code start at the same position.
lnPos = ATC(ALLTRIM(oFoxcode.Abbrev),lcLine)
lcSpace = SUBSTR(lcLine,1,lnPos-1)
>Who knows what lcSpace does in an Intellisense Script? And are there any other variables that can be used? I couldn't find it in the Intellisense documentation.
>
>
IF ~
>
><<lcSpace>>ELSE
>
><<lcSpace>>ENDIF
--sb--