13

How to horizontally scroll in Notepad++? I know the way by dragging horizontal scroll bar, but I would like more convenient way:

  1. Scrolling with keyboard

  2. Scrolling with mouse wheel while holding Shift key pressed.

I have lots of long lines in logs files. And I need to scroll very fast both ways: horizontally and vertically.

gronostaj
  • 55,965
  • 20
  • 120
  • 179
ViliusK
  • 1,760
  • 4
  • 17
  • 18
  • 1
    there is finally a [fix to N++](https://github.com/notepad-plus-plus/notepad-plus-plus/pull/5184) for this. if we're lucky, it should be included in the next build. – shawn Feb 16 '19 at 00:38

4 Answers4

8

How to horizontally scroll in Notepad++?

You can scroll horizontally in Notepad++ the same way(s) you scroll horizontally in any other program. A convenient way

I know the way by dragging horizontal scroll bar, but I would like more convenient way.

It depends on what you consider convenient, but there are a few options.

Scrolling with keyboard

You can usually use the Left and Right keys in combination with some modifiers in most programs. For example, Ctrl+Left/Right usually scrolls all the way or one interval. Also, PageUp and PageDown can usually be combined with Ctrl to scroll one interval horizontally instead of vertically. The same goes for Home and End (which typically scroll to the beginning or end of a line).

In the case of Notepad++ specifically, it doesn’t seem to support any of these by keyboard or via mouse. Unfortunately, even the Shortcut Mapper doesn’t seem to have any horizontal-scrolling items that can be mapped to a hotkey. You could look for a plugin, but there is an easier way:

Universal Solution

Scrolling with mouse wheel while holding Shift key pressed.

Some programs support this intrinsically and some mouse drivers/software supports it, but you easily set it up manually with AutoHotkey.

The AutoHotkey documentation already has a convenient script that lets you scroll horizontally by holding a modifier key and turning the mouse-wheel (reproduced here with Shift instead of LControl):

~Shift & WheelUp::  ; Scroll left
  ControlGetFocus, fcontrol, A
  Loop 2  ; <-- Increase this value to scroll faster.
    SendMessage, 0x114, 0, 0, %fcontrol%, A  ; 0x114=WM_HSCROLL; 0=SB_LINELEFT
return

~Shift & WheelDown::  ; Scroll right
  ControlGetFocus, fcontrol, A
  Loop 2  ; <-- Increase this value to scroll faster.
    SendMessage, 0x114, 1, 0, %fcontrol%, A  ; 0x114=WM_HSCROLL; 1=SB_LINERIGHT
return

You can customize and extend the script as needed; for example, you can add keyboard hotkeys, modify the scroll amount, etc.

I have lots of long lines in logs files. And I need to scroll very fast both ways: horizontally and vertically.

You can create multiple hotkeys as above to scroll a little, a medium amount, or a lot to suit your needs. You can even compile your script and run it as a background program.

André Chalella
  • 1,089
  • 1
  • 10
  • 19
Synetech
  • 68,243
  • 36
  • 223
  • 356
  • `Scrolling with mouse wheel while holding Shift key pressed.` doesn't works for me :( – alexmelyon Dec 12 '16 at 10:54
  • 5
    So you start claiming that _"You can scroll horizontally in Notepad++ the same way(s) you scroll horizontally in any other program"_, then go on and explain some of those ways that _"You can usually use (...) in most programs"_, just to end up saying that _"Notepad++ specifically, doesn’t seem to support any of these"_. So **clearly you can NOT scroll horizontally in Notepad++ the same way(s) you scroll horizontally in any other program**. OP was right to ask, and your first, condescending and factually wrong paragraph should be removed from the answer. – walen Nov 22 '17 at 11:27
  • 1
    Thanks a ton for the autohotkey script. I have to scroll all the time at work horizontally. – Edza Mar 03 '18 at 14:38
  • For those wondering, Notepad++ has this enabled by default as of version 7.7.1 ([here's the commit for the curious](https://github.com/notepad-plus-plus/notepad-plus-plus/commit/dd8ae05429250c93028806c2187088446e7644d5)). – bsplosion Oct 09 '19 at 19:48
4

As of at least Jan. 1, 2019 (possibly sooner), the feature of horizontal scrolling by holding down Shift + scrolling with the mouse wheel has been added.

Simply update to the most recent version of Notepad++ on your computer. The feature will be enabled by default. You can download the latest version of Notepad++ here: https://notepad-plus-plus.org/download/

(Source: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/5184)

Dennis
  • 41
  • 1
2
  1. My mouse (Logitex RX 250) supports vertical scrolling by tapping the mousewheel to the left and right

  2. in the menu option "view" you can activate the "wrap" option. this will wrap long lines so that vertical scrolling won't be necessary because anything that would leave the window is being wraped and written under the line.

  3. Holding "ctrl" key and then holding right will go to the right jumping from word to word.

ITroubs
  • 121
  • 3
  • 1. I have Logitech too, and I like to keep mouse wheel tapping to sides mapped to "Go Back" and "Go Forward". 2. I want my lines to be unwrapped, because it's very long LOGS lines, I want to see all lines beginnings lined up. 3. Words are not always same length and it happens, that it can jump more to the right, than it fits into the screen if there would be a very long "word". Sometimes it happens. 4. I don't want to zoom out either. – ViliusK Apr 08 '11 at 11:19
  • 1
    well zooming wouldn't be a good option yes. then you could do some kind of makro or use "autohotkey" to creade a certain hot key that taps right for example 10 20 or 50 times. – ITroubs Apr 08 '11 at 11:33
  • there also are some gesture programs you can use to make a gesture like holding right mouse button and swiping to the right what makes 50 taps on the right arrow key in the current activated window. i think the program i once used for gestures is called "strokeit" – ITroubs Apr 08 '11 at 11:36
  • @ViliusK did anything of this help? – ITroubs Apr 08 '11 at 12:22
  • None of above are good. Macro is not good as well, because not all lines are same length. So if I would use a macro which goes 50 symbols to the right it might jump to next line and go to the beginning of line. – ViliusK Apr 12 '11 at 13:12
  • I have had this mouse for years, and never knew about #1 above. Very handy! – bnieland Aug 07 '15 at 13:39
2

I was also looking for convenient option to scroll horizontally, what worked for me is to right click on scroll arrow, and click on "Page Left" or "Page Right" to move 1 page left or right respectively.

Left Edge and Right Edge also useful to provide similar function that of Home or End.