Auto complete structure

General and specific configuration/INI settings

Auto complete structure

Postby palou » Fri Dec 17, 2004 8:49 am

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 autocomplete file on the IDM web site but, I can't find one with such feature.

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

Thank's.
User avatar
palou
Basic User
Basic User
 
Posts: 46
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland

Re: Auto complete structure

Postby Mofi » Tue Dec 21, 2004 11:14 am

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 {}.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4054
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Auto complete structure

Postby palou » Tue Dec 21, 2004 11:30 am

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
User avatar
palou
Basic User
Basic User
 
Posts: 46
Joined: Fri Dec 17, 2004 12:00 am
Location: Geneva / Switzerland


Return to Configuration/INI Settings