[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: commenting
- From: Phillip David <phillip_david(at)xontech.com>
- Date: Fri, 02 Mar 2001 11:09:50 -0800
- Newsgroups: comp.lang.idl-pvwave
- Organization: WebUseNet Corp http://www.usenetserver.com - Home of the fastest NNTP servers on the Net.
- References: <3A9294CD.17128A2D@cmb.physics.wisc.edu>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:23826
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.
"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.