comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to Auto Insert IDL 7 Template
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to Auto Insert IDL 7 Template [message #58016 is a reply to message #58015] Wed, 09 January 2008 10:44 Go to previous messageGo to previous message
Douglas G. Dirks is currently offline  Douglas G. Dirks
Messages: 10
Registered: October 2006
Junior Member
David Fanning wrote:
> Ryan. writes:
>
>> Does anyone know how to get the 'Auto Insert' Feature to work in IDL
>> 7? I've set them in Window->Preferences->IDL->Templates to "ON" but
>> can't figure out how it works. Is there some special keystroke I
>> need?
>
> Start to type the template, then type CNTL-space. You should
> have the option of filling in with the appropriate template.
>
> Cheers,
>
> David

Hi Ryan,

David's response is, of course, correct -- and admirable in its brevity.
To amplify just a little...

Templates are a subset of what Eclipse (and thus the IDL Workbench)
calls "Content Assist." To insert a content assist item, you press
Ctrl-Space. One of two things will happen:

- If you have already typed all of the name of the item you want
to insert (or enough to identify it uniquely), the entire thing
will just be inserted.
- If you have typed less than enough to uniquely identify any item,
a list pops up and you can choose what you want to insert.

So, if you've got a template named, say, "SuperCoolTemplate," you can
start by typing (for example) "su" and then pressing Ctrl-Space. If
no other template starts with "su" your template will be inserted. If
there are others that start with "su" you'll have to select one from
the dialog.

The same shortcut technique works with other content assist items.
Say you're tired of typing

file=DIALOG_PICKFILE()

Just type

file=di Ctrl-Space

and scroll down to the DIALOG_PICKFILE entry, then press Enter.

Note that if the item you're inserting (be it routine name or
template) consists of a single line, you can also use this in
the Command Line view. For example, I find myself selecting
files from IDL's examples directory fairly often, so I made myself
a single line template named "examples" that looks like this:

FILEPATH('${file}', SUBDIRECTORY=['examples', 'data'])

In the Command Line view, I can type

file=exa Ctrl-Space

and all that pops in automatically, with the cursor positioned
over the variable 'file' so I can type in the name of the example
file I want.

Anyway, you can read more about templates and content assist in
the IDL help by entering the following at the IDL command prompt:

ONLINE_HELP, 'Templates'
ONLINE_HELP, 'Getting_Help'


I hope that helps,
Doug

----------------
Douglas G. Dirks
IDL Documentation Group * ITT Visual Information Solutions
4990 Pearl East Circle * Boulder, CO 80301
ddirks@ittvis.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: postgresql queries
Next Topic: Re: how to sort data based on other sorted data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 09:12:55 PDT 2025

Total time taken to generate the page: 0.08064 seconds