How to horizontally scroll in Notepad++? I know the way by dragging horizontal scroll bar, but I would like more convenient way:
-
Scrolling with keyboard
-
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.
Best Answer
You can scroll horizontally in Notepad++ the same way(s) you scroll horizontally in any other program. A convenient way
It depends on what you consider convenient, but there are a few options.
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
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 ofLControl
):You can customize and extend the script as needed; for example, you can add keyboard hotkeys, modify the scroll amount, etc.
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.