Menu

Select To Line #; is it possible?

2006-08-10
2012-11-13
  • Nobody/Anonymous

    Greetings,

    I love Notepad++, but it's missing one key feature (IMNSHO, :-) that requires me to keep an older editor around.  It is frequently necessary for me to be able to select a block of text from one line number to another.  For example, on some of the 300k+ lines of text in some files, I need to be able to select from line 129,755 to Line 256,703 (usually for a delete).  Doing a select by mouse takes forever for the scroll to catch up.

    I keep an old DOS / 16bit Windows code, Programmer's File Editor (PFE) around, solely because it has this functionality. You select a block of text to start, hit Alt-G, and when it prompts you for the line to go to, it has a checkbox indicating 'continue selection to target line y/n?'.

    Is there a way to do this in Notepad++ already that I'm too blind to see?

     
    • Nobody/Anonymous

      "I keep an old DOS / 16bit Windows code, Programmer's File Editor (PFE) around"

      WRONG. No DOS, Widows only 16 or 32 bit.

      "It is frequently necessary for me to be able to select a block of text from one line number to another."

      Useful suggestion.

       
      • mykro76

        mykro76 - 2008-06-27

        I need something like this too... I have many very long lines, and want a "Select Current Line" option, after which I can then Ctrl C to capture the entire line.

        however I am happy to use a "select line _12054_ to _12054_" feature if this is the implementation decided upon.

         
        • Fool4UAnyway

          Fool4UAnyway - 2008-06-27

          Menu_____ : Settings
          Option___ : Shortcut Mapper
          Button___ : Scintilla commands

          Line 90__ : SCI_LINEDELETE (Ctrl+E for me)
          Line 91__ : SCI_LINECUT (Ctrl+L)
          Line 92__ : SCI_LINECOPY (Ctrl+Shift+T)
          Line 93__ : SCI_LINEDUPLICATE [no shortcut defined, but]

          Line 16__ : SCI_SELECTIONDUPLICATE (Ctrl+D, no selection = duplicate line)

          You probably don't even have to select an individual line in order to do what you want.
          You can immediately erase, cut or copy it.
          You can even directly duplicate a line and then move it by using Ctrl+D (without a selection) and then Ctrl+Shift+CursorUp or Ctrl+Shift+CursorDown.

           
    • Nobody/Anonymous

      I don't think there is a way to do this.
      I tried F2 (next bookmark) during drag, and that
      does not work.
      I can think of two ways to add this feature, one as an extension of ^G, that prompts for start-end select lines, and the other would be a simple menu option to 'select Text between bookmarks'
      jmg_

       
      • Fool4UAnyway

        Fool4UAnyway - 2008-06-27

        Another approach is a rigid selection mode, which you activate by some key and selects all text from that position to the current cursor position. You can easily move the cursor around then to the desired other boundary. If search functions would be sensitive, they could work together to move the cursor only to the (next) match without selecting the match then.

        An alternative would be to have to press the rigid selection mode key twice, once for the starting position and once for the ending position. It would allow to jump (back) to either the starting or ending position, like bookmarks, that don't "remember" the inline cursor position. This would also be the case if there were two separate keys for the rigid selection boundaries.

         
        • pshute

          pshute - 2008-07-01

          "Another approach is a rigid selection mode, which you activate by some key and selects all text from that position to the current cursor position."

          I like that idea. Very simple, you would think, to implement, and very flexible.  It's decades since I used an editor with a select mode, I think it was EDT under VMS, but I occasionally still miss it.  It lets you do things like enter text that you intend to copy elsewhere, while already in select mode, then simply copy and paste without having to select it first.