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

Home » Public Forums » archive » commenting
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
commenting [message #23794] Tue, 20 February 2001 08:01 Go to next message
Christopher W. O'Dell is currently offline  Christopher W. O'Dell
Messages: 20
Registered: February 2001
Junior Member
This is probably wishful thinking, but is there any way to
comment out a large section of code as in C,
where you don't have to insert a ';' on every line of code,
but you can use a beginning and ending comment delimiter?
I have this idea that there might be secret delimiters that
i have not yet heard about in IDL. And I'm very lazy and
have often longed for this feature.

Chris
Re: commenting [message #24073 is a reply to message #23794] Fri, 02 March 2001 11:09 Go to previous messageGo to next message
Phillip David is currently offline  Phillip David
Messages: 36
Registered: April 1999
Member
Any GOOD editor will allow you to do things in a vertical block of text,
such as duplicate, fill, or delete. Duplicate column 1, fill the new
column 1 with ; to comment code out. Select column 1 and delete it to
uncomment the code.

I have a macro in KEdit (my favorite Windows editor) that allows me to
do what I call a "Column cursor" -- i.e., I can select a 1 character
column across multiple lines, and can perform the same operation on each
line. These operations can be insert, delete, overwrite, etc. KEdit
also has a REALLY nice feature of allowing you to display just lines
matching a certain pattern. So, for example, I can have it search
column 73 on, find all lines that contain anything, insert a carriage
return, 5 blanks, and a continuation character in FORTRAN codes with
just a few keystrokes. Of course, that's not very elegant, and F90
eliminates the need for this most of the time, but...

This combination of features (operating only on selected lines using a
column cursor) is so powerful that it's kept me from converting to emacs
or any other editor, and often allows me to do jobs in 2-3 minutes that
it would take others literally HOURS of editing to accomplish.

Phillip

"Christopher W. O'Dell" wrote:
>
> This is probably wishful thinking, but is there any way to
> comment out a large section of code as in C,
> where you don't have to insert a ';' on every line of code,
> but you can use a beginning and ending comment delimiter?
> I have this idea that there might be secret delimiters that
> i have not yet heard about in IDL. And I'm very lazy and
> have often longed for this feature.
>
> Chris
Re: commenting [message #24089 is a reply to message #23794] Thu, 08 March 2001 21:59 Go to previous message
Wayne Landsman is currently offline  Wayne Landsman
Messages: 117
Registered: January 1997
Senior Member
David Fanning wrote:

> John-David Smith (jdsmith@astro.cornell.edu) writes:
>
>> You mean like:
>>
>> [M-C-%]^\([C-u 73 .]\)\(.+\)[Ret]\1$[C-q C-j] \2[Ret]
>
> Is there a Berlitz course for this Emacs editor?
>
> Cheers,
>

My favorite apochryphal story about Emacs is that the name is really an
acronym for Escape-Meta-Alt-Control-Shift, since its apparent purpose is
to make one use those keys as much as possible.

Still, all those nice IDLWAVE mode features make me tempted to try one
more time to learn Emacs. At least now I know where the Meta key is
located...

--Wayne Landsman landsman@mpb.gsfc.nasa.gov
Re: commenting [message #24090 is a reply to message #23794] Thu, 08 March 2001 18:18 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
John-David Smith (jdsmith@astro.cornell.edu) writes:

> You mean like:
>
> [M-C-%]^\([C-u 73 .]\)\(.+\)[Ret]\1$[C-q C-j] \2[Ret]

Is there a Berlitz course for this Emacs editor?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: commenting [message #24091 is a reply to message #24073] Thu, 08 March 2001 17:10 Go to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Phillip David wrote:
> I have a macro in KEdit (my favorite Windows editor) that allows me to
> do what I call a "Column cursor"
<snip>
> So, for example, I can have it search
> column 73 on, find all lines that contain anything, insert a carriage
> return, 5 blanks, and a continuation character in FORTRAN codes with
> just a few keystrokes. <snip> it's kept me from converting to emacs


You mean like:

[M-C-%]^\([C-u 73 .]\)\(.+\)[Ret]\1$[C-q C-j] \2[Ret]

JD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Color 'n linestyle picker for Plot
Next Topic: thumbnails

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

Current Time: Wed Oct 08 08:51:04 PDT 2025

Total time taken to generate the page: 0.00447 seconds