Loading ...
Sorry, an error occurred while loading the content.
 

[Clip] Re: Debugger Aids in the Clip Assistant

Expand Messages
  • Aaron
    ... Larry - You inspired me to get off my lazy bum and write the comment/uncomment clips that *I* would want to use. :) My way of working is to select a
    Message 1 of 2 , Jun 29, 1999
      At 03:38 AM 6/29/99 -0500, Larry Thomas wrote:
      >I finally decided that I wanted to write the clips for myself.

      Larry -

      You inspired me to get off my lazy bum and write the comment/uncomment
      clips that *I* would want to use. :) My way of working is to select a block
      of text that I want to comment out and then hit CTRL-B, which would put a
      ; in the start of each line (It's the shortcut for "Bullet mode" I
      think). The
      problem is that it would double-comment lines that were already commented
      that were part of the selection.

      So, without further ado, here are my versions, in case anyone else out there
      works like I do...

      They're a little longer, but quicker, in my estimation. Select the lines
      you wish
      to comment out, and run the first. Note that it does not comment multiple
      times.
      Also note that the uncomment clip will "clean up" multiply commented lines.
      (The uncomment is pretty much identical to yours, except I added an "A" to
      the replace, to allow for uncommenting multi-lined blocks of text.)

      Both leave the cursor on the line following the selected text block.

      ---------start comment clip--------------------
      ^!Set %OrigDoc%=^$GetDocIndex$
      ^!SetScreenUpdate Off
      ^!Select Lines
      ^!Toolbar Copy
      ^!Keyboard ALT+f n
      ; Add an extra line break at start to make regexp matching easier...
      ^!Keyboard ENTER
      ^!Paste
      ^!Jump TEXT_START
      ^!Replace "^P[^;]" >> "^P;^T" TSRA

      ; clean up the extraneous line break we added.
      ^!Jump TEXT_START
      ^!Keyboard Delete

      ^!Select All
      ^!Toolbar Copy
      ^!Close DISCARD
      ^!SetDocIndex ^%OrigDoc%
      ^!SetScreenUpdate On
      ^!PasteSelect
      ^!Focusdoc
      ----------- end comment clip----------------

      ---------- start uncomment clip -----------
      ^!Select Lines
      ^!Replace "^;*" >> "" THSRA
      ^!Focusdoc
      ---------- end uncomment clip ------------
      Buy Tony Hawk's Pro Skater

      ------------------------------------------------------------------------

      eGroups.com home: http://www.egroups.com/group/ntb-clips
      http://www.egroups.com - Simplifying group communications
    Your message has been successfully submitted and would be delivered to recipients shortly.