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

Re: Delete Line Numbers

Expand Messages
  • Hugo
    John, I suppose you know which lines to delete: this clip asks for the strings at the start and the end of the selection and then deletes everything in
    Message 1 of 4 , Nov 1, 2001
    • 0 Attachment
      John,

      I suppose you know which lines to delete: this clip asks for the
      strings at the start and the end of the selection and then deletes
      everything in between.

      ^!ClearVariable %Start%
      ^!ClearVariable %End%
      ^!Set %FirstUse%=1
      :SETTERMS
      ^!If ^%FirstUse%=1 ^!SetWizardLabel Fill in the fields...
      ^!If ^%FirstUse%=0 ^!SetWizardLabel Your search was not successful.
      Try again or cancel...
      ^!Set %FirstUse%=0
      ^!Set %Start%="^?{Find &Start of section to be deleted=^%Start%}"; %
      End%="^?{Find &End of section to be deleted=^%End%}"
      ^!IfTrue ^$IsEmpty(^%Start)$ SETTERMS
      ^!IfTrue ^$IsEmpty(^%End%)$ SETTERMS
      :FIND
      ^!Find ^%Start% TIWS
      ^!IfError SETTERMS
      ^!Set %SelectionStart%=^$GetRow$:1
      ^!Find ^%END% TIWS
      ^!IfError SETTERMS
      ^!Jump Line_END
      ^!Keyboard RIGHT
      ^!SelectTo ^%SelectionStart%
      ^!Continue Clear the selection?
      ^!ToolBar Clear ALL
      ;^!ToolBar Paste New
      : Attention
      ; No safety measures have been taken in this clip. You could
      ; copy your original document and make a backup first, undo
      ; with a clipboard containing several thousands of lines might
      ; not work!
      ; You can reload your original document if there's something
      ; wrong with the replacement.
      ; You can check what is cut out of the document by activating.
      ; ^!ToolBar Paste New.


      >
      > If I need to delete hundreds of lines, highlighting them is not a
      > choice as is can be very time consuming (Try holding the mouse
      button
      > for 5-10 minutes ;)).

      I agree...You probably know this, but you don't have to do it like
      that. Select the word at the beginning of your section to be deleted.
      Hold down SHIFT and drag the vertical scrollbar to the area where
      your end would be. Now click in this area with your mouse, and
      everything in between is selected. You can now extend or decrease
      your selection by hitting PAGEUP|PAGEDOWN|UP|DOWN while still holding
      SHIFT...

      Hugo

      PS - in Alec's regular expression I think you should read
      REPLACE "\?\*\?\n" >> "" R as REPLACE "\?\a*\?\n" >> "" R.
    • Jim Hall
      John, Save yourself a lot of time by Highlighting the first number/line, use the slider to find the last number/line, Then hold the SHIFT key down while you
      Message 2 of 4 , Nov 1, 2001
      • 0 Attachment
        John,

        Save yourself a lot of time by Highlighting the first number/line,
        use the slider to find the last number/line,
        Then hold the SHIFT key down while you highlight the last number/line.

        All lines in between will be highlighted for you.

        Regards,

        Jim



        >If I need to delete hundreds of lines, highlighting them is not a
        >choice as is can be very time consuming (Try holding the mouse button
        >for 5-10 minutes ;)).
      Your message has been successfully submitted and would be delivered to recipients shortly.