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 #58011] Wed, 09 January 2008 11:36 Go to previous message
Ryan. is currently offline  Ryan.
Messages: 77
Registered: March 2006
Member
On Jan 9, 1:44 pm, "Douglas G. Dirks" <ddi...@ittvis.com> wrote:
> 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
> ddi...@ittvis.com

Wow, Thanks Doug. I had just started to code with emacs when IDL 7
came out so I knew something about templates but never managed to
figure out how to change them. I did find the place in IDL 7 where
they can be edited. Now my coding will go much faster =)

I don't know if I'm looking forward to the days where IDL is
intuitively obvious to all because I enjoy reading David's articles of
the idiosyncrasies of IDL. However, working with an intuitively
obvious software program will sure make the work day go much faster
and less frustrating. =)

Ryan.
[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: Fri Oct 10 15:19:26 PDT 2025

Total time taken to generate the page: 0.23861 seconds