Auto complete structure

Auto complete structure

46
Basic UserBasic User
46

    Dec 17, 2004#1

    Hello all,

    I'm a new user of UE and I'm looking for an auto complete feature which works "on the fly". That means I start to write (without the quote)
    " if "
    then after the space, it will automatically complete the structure
    " if ()
     {
      }"
    and put the cursor between parentheses. I take a look at the auto-complete file on the IDM website but, I can't find one with such feature.

    Is anybody here who knows if it's possible and eventually how to do?

    Thanks.

    6,685587
    Grand MasterGrand Master
    6,685587

      Dec 21, 2004#2

      I don't have much experience with auto-complete, but I think this is not possible with auto-complete because of line breaks and cursor placement. But it can be done with a macro.

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      "if ()
      {
      }
      "
      Key UP ARROW
      Key UP ARROW
      Key END
      Key LEFT ARROW


      Assign a hotkey for the macro, for example Ctrl+Shift+I and save this macro in a macro file, which is automatically loaded on startup (menu Macro - Set Auto Load). Now you only have to press Ctrl+Shift+I to insert the if statement. Disadvantage of this solution: no auto indent for {}.
      Best regards from an UC/UE/UES for Windows user from Austria

      46
      Basic UserBasic User
      46

        Dec 21, 2004#3

        Thank's again Mofi, :D

        I have tried this solution and have written some macros with a pretty nice generic way to run it. I still need to improve it (during Chrismas holidays) and I'll post it to the "Macro" forum.

        Merry Chrismas,
        Alain
        Never forget: "Above the clouds, The sky is blue and the sun shine"