Notepad++ - Selecting Text to End of Line


  1. Posts : 11
    Windows 7 Pro 64-bit
       #1

    Notepad++ - Selecting Text to End of Line


    Hi,

    I don't know if this is the proper forum. I did want to post this question at the NPP forum, but I don't have any of the accounts required for registering (Github, Facebook, etc.), so I thought I'd ask here. If no one has an answer, no big deal. :)

    Anyway, I don't use NPP for coding. Mainly for writing. I like the simplicity of a plain text editor for that. But all other editors I've used (including Word 2007 and other word processors) allow me to select text to the end of a "line" by using "shift + end." But NPP works differently. That's why I put "line" in quotes. NPP treats a line like a paragraph, as if it were one, long, unwrapped line of text/code rather than as a single run of text that ends at the right-hand margin. Placing the cursor within a paragraph and hitting "Shift + End" will select the entire remainder of the paragraph.

    This behavior, apparently, explains why NPP also displays the column numbers as it does. (A 'column' appearing just a few characters in from the left-hand margin toward the end of a paragraph might be column number 753 instead of column 6.)

    In any case, I'd like to know if it's possible to use NPP the way I would normally use other editors, i.e. by using "shift + end" (or some other keyboard shortcut I haven't been able to find in NPP or the NPP wiki) to select text extending to the right-hand margin only, not fully to the end of a paragraph.

    Thanks for any input!
      My Computer


  2. Posts : 181
    Windows 7 Home Premium SP1
       #2

    Interesting question! I've used NPP for a long time, but for selecting text I simply highlight with the mouse. The margins you see vary with the size of the NPP window in use, and, afaik, there's no way to set them with the text editor, so maybe that's why a keyboard shortcut isn't possible.
      My Computer


  3. Posts : 11
    Windows 7 Pro 64-bit
    Thread Starter
       #3

    gini said:
    Interesting question! I've used NPP for a long time, but for selecting text I simply highlight with the mouse. The margins you see vary with the size of the NPP window in use, and, afaik, there's no way to set them with the text editor, so maybe that's why a keyboard shortcut isn't possible.
    Thanks for your reply, gini. For myself, I find it a lot easier simply to use the keyboard shortcut for such text selecting (if I'm doing so as I'm typing away on a document). So "shift + end/home" or "ctrl + shift + end/home" come very naturally for me. And I understand what you say about the margins, but that's something pretty much common to all text editors & word processors of which I'm aware when you have word wrap on. But all the other editors I've used (e.g. Word, WriteMonkey, Metapad, Notepad, Wordpad, etc.) work the same way: "shift + end" will only select the text on the line on which the blinking cursor is located and will only extend as far as the right margin, however wide the margin may be. That's what makes NPP so odd. It's the first editor I've used that thinks the "end" is the end of the paragraph. IOW it's selecting all text up to the next line-break or paragraph and not what we would think of as a normal "line" of text. Strange. I can live with it if I have to, since I do like NPP's other features. But I would like to figure a way to get it to work like all the other editors in this regard if I can. Anyway, thanks again for your comment.
      My Computer


  4. Posts : 1,872
    Windows 10 Pro x64, Windows 8.1 Pro x64, Windows 7 Ultimate x64 SP1,
       #4

    What version NotePad++ are you using?

    I have version 8.8.8 and when I press Shift + End, it selects text to the end of the line.

    Have a look at this though.

    keyboard shortcuts - Notepad++: select text till the end of visual line with SHIFT+END - Super User
    Last edited by pbcopter; 27 Jan 2016 at 12:35.
      My Computer


  5. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #5

    I think i understand what foggy is asking about.
    The difference i see is if Word Wrap is enabled, it might select text differently than other programs.

    NPP always selects everything including the wrapped text, no matter what the "Word Wrap" setting is.
    Some other editors do not select the "wrapped text lines", and only select text to the end of the "displayed text line".

    It's not an issue for me because i do the same as gini in post #2
    but for selecting text I simply highlight with the mouse
    I would like to see NPP have a Print Preview, but i never found that feature.
      My Computer


  6. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #6

    I use EMEditor instead of Notepad++ but I can say that for any text editor that i have used:

    Single Click: Inserts cursor
    Another Single Click: Highlights one word
    Double Click: Highlights line
    Triple Click: Highlights paragraph (for some not all text editors)

    Also depends upon correct punctuation
      My Computer


  7. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #7

    Callender said:
    I use EMEditor instead of Notepad++ but I can say that for any text editor that i have used:

    Single Click: Inserts cursor
    Another Single Click: Highlights one word
    Double Click: Highlights line
    Triple Click: Highlights paragraph (for some not all text editors)

    Also depends upon correct punctuation
    Thanks for the EMEditor tip !
    I see they have a portable version, so i'll have to give it a try.
    :)

    I still use an old unsupported text editor (CEDT), but i like it and it works for me.
      My Computer


  8. Posts : 11
    Windows 7 Pro 64-bit
    Thread Starter
       #8

    pbcopter said:
    What version NotePad++ are you using?

    I have version 8.8.8 and when I press Shift + End, it selects text to the end of the line.

    Have a look at this though.

    keyboard shortcuts - Notepad++: select text till the end of visual line with SHIFT+END - Super User
    BINGO! Thanks for that link, pbcopter!! It was exactly what I was looking for. (For whatever reason I never came across that page in my internet search on the subject.)

    All is good.
      My Computer


  9. Posts : 11
    Windows 7 Pro 64-bit
    Thread Starter
       #9

    Thanks also to DavidE and Callender for your comments.

    Yes, David, you understood my concern. Fortunately, pbcopter's link did the trick.

    Callender, for NPP a double-click selects the word and a triple-click selects the whole paragraph. Nothing click-wise selects only the displayed line. But things are back to normal for me now anyway, so I can't complain.

    Thanks again for all your input. Problem solved. :)
      My Computer


  10. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #10

    DavidE said:

    Thanks for the EMEditor tip !
    I see they have a portable version, so i'll have to give it a try.
    :)

    I still use an old unsupported text editor (CEDT), but i like it and it works for me.
    The thing about EMEditor (free version) is that it opens/ edits huge text files in an instant.

    If I use Notepad to open my Hosts file it takes forever so that was the main reason I switched.

    Notepad++  -  Selecting Text to End of Line-hostsman.jpg

    Notepad++  -  Selecting Text to End of Line-hostsman2.jpg

    There is a way of forcing any application like the above to open files using EMEditor instead of Notepad.

    Notepad++  -  Selecting Text to End of Line-registry-editor.jpg

    If you create a new key named notepad.exe here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options

    Then create a new String Value in the right pane, name it Debugger, then enter the following:

    Notepad++  -  Selecting Text to End of Line-edit-string.jpg

    EMEditor will launch instead of Notepad any time that Notepad tries to run.

    The same method can be used to replace Notepad with other text editors, Just add the path to the executable.
    Last edited by Callender; 27 Jan 2016 at 16:14. Reason: correction
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:41.
Find Us