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

Home » Public Forums » archive » Re: Custom formatting under version 7.0?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Custom formatting under version 7.0? [message #57159] Tue, 04 December 2007 16:34 Go to next message
sbolin42 is currently offline  sbolin42
Messages: 10
Registered: December 2007
Junior Member
On Dec 4, 4:34 pm, Pierre <pierre.villene...@gmail.com> wrote:
> On Dec 4, 2:40 pm, sboli...@gmail.com wrote:
>
>> On Dec 4, 2:45 pm, Pierre <pierre.villene...@gmail.com> wrote:
>
>>> I have been using the new eclipse-based DE for the past few days and
>>> overall I like what I see. One thing I can't figure out yet is how to
>>> modify the auto-formatting rules to force my code to line up with
>>> parentheses, like this:
>
>>> res = my_func(arg0, arg1, $
>>> key1 = key1, $
>>> key2 = key2)
>
>>> I would like the lines that follow an open parenthesis to
>>> automatically indent to that same column. I don't know if the above
>>> example will show it since it probably depends on viewing this post
>>> with a fixed width font.
>
>>> Anyhow, does anyone know if this is even possible with the new DE?
>>> Thanks!
>
>>> Pierre
>
>> Pierre,
>
>> Unfortunately, the auto-formatter is not that sophisticated at this
>> point in time.
>> It will just identify an IDL line as a continuation of a previous
>> line, and
>> then indent by the amount dictated by the preference IDL->Editor-
>
>>> Displayed tab width
>
>> -Scott
>
> Thanks for the reply Scott. Is it at all possible to modify the
> formatting rules from the user's end, or are they currently "hard
> coded" into the system?
>
> -Pierre

There is not a way to expand/define the formatting rules. But, I'll
record your suggestion for consideration in a future release. Thanks
for the input.

-Scott
Re: Custom formatting under version 7.0? [message #57160 is a reply to message #57159] Tue, 04 December 2007 15:34 Go to previous messageGo to next message
Pierre V. is currently offline  Pierre V.
Messages: 13
Registered: December 2006
Junior Member
On Dec 4, 2:40 pm, sboli...@gmail.com wrote:
> On Dec 4, 2:45 pm, Pierre <pierre.villene...@gmail.com> wrote:
>
>
>
>> I have been using the new eclipse-based DE for the past few days and
>> overall I like what I see. One thing I can't figure out yet is how to
>> modify the auto-formatting rules to force my code to line up with
>> parentheses, like this:
>
>> res = my_func(arg0, arg1, $
>> key1 = key1, $
>> key2 = key2)
>
>> I would like the lines that follow an open parenthesis to
>> automatically indent to that same column. I don't know if the above
>> example will show it since it probably depends on viewing this post
>> with a fixed width font.
>
>> Anyhow, does anyone know if this is even possible with the new DE?
>> Thanks!
>
>> Pierre
>
> Pierre,
>
> Unfortunately, the auto-formatter is not that sophisticated at this
> point in time.
> It will just identify an IDL line as a continuation of a previous
> line, and
> then indent by the amount dictated by the preference IDL->Editor-
>
>> Displayed tab width
>
> -Scott

Thanks for the reply Scott. Is it at all possible to modify the
formatting rules from the user's end, or are they currently "hard
coded" into the system?

-Pierre
Re: Custom formatting under version 7.0? [message #57162 is a reply to message #57160] Tue, 04 December 2007 14:40 Go to previous messageGo to next message
sbolin42 is currently offline  sbolin42
Messages: 10
Registered: December 2007
Junior Member
On Dec 4, 2:45 pm, Pierre <pierre.villene...@gmail.com> wrote:
> I have been using the new eclipse-based DE for the past few days and
> overall I like what I see. One thing I can't figure out yet is how to
> modify the auto-formatting rules to force my code to line up with
> parentheses, like this:
>
> res = my_func(arg0, arg1, $
> key1 = key1, $
> key2 = key2)
>
> I would like the lines that follow an open parenthesis to
> automatically indent to that same column. I don't know if the above
> example will show it since it probably depends on viewing this post
> with a fixed width font.
>
> Anyhow, does anyone know if this is even possible with the new DE?
> Thanks!
>
> Pierre

Pierre,

Unfortunately, the auto-formatter is not that sophisticated at this
point in time.
It will just identify an IDL line as a continuation of a previous
line, and
then indent by the amount dictated by the preference IDL->Editor-
> Displayed tab width

-Scott
Re: Custom formatting under version 7.0? [message #57321 is a reply to message #57160] Wed, 05 December 2007 09:09 Go to previous message
Doug Edmundson is currently offline  Doug Edmundson
Messages: 58
Registered: November 2005
Member
Pierre wrote:
> On Dec 4, 2:40 pm, sboli...@gmail.com wrote:
>> On Dec 4, 2:45 pm, Pierre <pierre.villene...@gmail.com> wrote:
>>
>>
>>
>>> I have been using the new eclipse-based DE for the past few days and
>>> overall I like what I see. One thing I can't figure out yet is how to
>>> modify the auto-formatting rules to force my code to line up with
>>> parentheses, like this:
>>> res = my_func(arg0, arg1, $
>>> key1 = key1, $
>>> key2 = key2)
>>> I would like the lines that follow an open parenthesis to
>>> automatically indent to that same column. I don't know if the above
>>> example will show it since it probably depends on viewing this post
>>> with a fixed width font.
>>> Anyhow, does anyone know if this is even possible with the new DE?
>>> Thanks!
>>> Pierre
>> Pierre,
>>
>> Unfortunately, the auto-formatter is not that sophisticated at this
>> point in time.
>> It will just identify an IDL line as a continuation of a previous
>> line, and
>> then indent by the amount dictated by the preference IDL->Editor-
>>
>>> Displayed tab width
>> -Scott
>
> Thanks for the reply Scott. Is it at all possible to modify the
> formatting rules from the user's end, or are they currently "hard
> coded" into the system?
>
> -Pierre

Hi Pierre,

Now might be a good time to bring up code templates. They don't resolve
formatting issues, but you might find them useful.

If you hit ctrl+space while focused in an editor, a context menu will
pop up. Normally this is used for word completion, but if you haven't
typed part of a word yet, the full list will start with several
templates. The IDL Workbench has the following templates built-in:

CASE, CATCH, FOR, FUNCTION, IF, PROCEDURE, REPEAT, SWITCH, and WHILE

If you select one of those, code will be inserted for you. It's great
if you can't remember the syntax for if-then-else. Note that some of
them allow you to select text and then apply the template. For example,
if you have "a = 1", select it and apply "IF", that text will be put
into an IF statement.

Note that if you type some letters and then press ctrl+space, the pop-up
list will trim the list of matches down.

The on-line documentation goes into more of the details. One thing you
can do is create your own templates. A good use of this might be to
insert standard code, comments, copyrights, etc. For more templates, go
to Preferences > IDL > Templates. The little "?" in the lower left will
bring up the documentation.

Doug
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Principal component analysis
Next Topic: Re: IDL 7.0 questions

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

Current Time: Wed Oct 08 15:48:23 PDT 2025

Total time taken to generate the page: 0.00576 seconds