This is a ridiculous question, but I have spent 20 minutes looking through options an I'm obviously missing something...

This is a ridiculous question, but I have spent 20 minutes looking through options an I'm obviously missing something...

In XE7 the IDE would do relatively useful and intuitive expansions when I entered certain things, triggered by the press of the spacebar.  For example, I'd enter "if " and it would fill in a then and begin/end, and drop my cursor in a logical spot.  I thought this  was something in Castalia, but it may have been some other plug-in?

In XE8, I get similar expansions when I press ENTER.  i.e. I type "begin " and it drops a line and puts in an "end;".

My question is this: did Castalia functionality change between XE7 and XE8 or am I thinking of another plugin?  Either way, does anyone have a clue were one would go to tailor the keywords it triggers on and what it does?  I can't for the life of me find this in the options anywhere...  I really miss this!

Comments

  1. I think you're referring to inbuilt functionality!  The begin/end thing is configured somewhere (can't remember where) - it's just to turn it on or off.  The expansion of "if" complete with a highlighted area you can type in is a live template, and you can find more about creating and editing them here: http://delphi.wikia.com/wiki/Delphi_Live_Templates

    ReplyDelete
  2. Thanks David Millington the Templates seems to be close to what I'm after.  I'm still wondering about how this was working before.  Must have been another plugin or something that I can not recall...

    ReplyDelete
  3. Jup, that is a built-in functionality with the name live templates. In XE (and hopefully XE7 and XE8) you find a menu under View -> Templates for existing live templates. While typing in source code you can get a autocomplete only for templates if you press Ctrl + j (in default binding).
    More documentation can be found here: http://docwiki.embarcadero.com/RADStudio/XE8/en/Live_Templates

    ReplyDelete
  4. Nathan Wild What else was working before? I'm not clear from your question what parts of what you describe are not inbuilt. As far as I can tell, everything you wrote about comes with Delphi, including "end" being added when you press Enter after a "begin", and isn't to do with Castalia or other plugins...

    ReplyDelete
  5. Yeah. This has nothing to do with Castalia; the base IDE has been doing it for years.

    ReplyDelete
  6. Are you having problems with "end" not being added after "begin"? That happens for me in both XE7 and XE8, for no reason I have managed to pin down. It doesn't seem to be to do with the complexity of the unit or amount of code in it; it just randomly doesn't work.

    (Of course it won't be random, there will be a reason, but I don't know what that is.)

    ReplyDelete
  7. Ah ha..  I had XE7 on my laptop still.  It IS Castalia.  In XE7 I have a Castalia | Template Editor menu option.  Inside this menu I can set up things.  In XE8, this menu does not exist...  It also appears that this is what is causing the templates to trigger on the press of instead of the in-built stuff that fires on ...

    ReplyDelete
  8. Nathan Wild live templates also trigger on space or Ctrl+space. It's possible that Castalia has something similar, I've never I used it.

    ReplyDelete

Post a Comment