4

I love the new document map they've added to Notepad++, but it makes the vertical scrollbar redundant for me. I poked through the settings but saw no way to remove it. Is there a way to hide it that anyone knows of?

3 Answers 3

5

I just recently switched to using the Document Map view but it's title paired with the now-redundant vertical scrollbar started kind of bothering me. I've been using AutoHotKey for years and it usually works like a charm for dirty quick "hacks" such as this. After a little research I achieved the desired effect. Here's what I added to my script:

#IfWinExist ahk_class Notepad++
Control, Hide,,Button3, ahk_class Notepad++
ControlGet, Handle, Hwnd,, Scintilla2, ahk_class Notepad++
SendMessage, 2280, 0, 0,, ahk_id %Handle% ;SCI_SETVSCROLLBAR=2280,hide=0,show=1
#IfWinExist

Here's a screenshot:

image

Must note that I rearely close N++, so whenever I open it, I just reload my script and the redundant elements are gone (until I close and open it again). However, the same routine can be binded to any hotkey/shortcut instead of running it once on script load – see AHK manual.


NOTE:

Works for Notepad++ v6.9.1. If this doesn't work for your version, use AutoIt3 Window Spy program that is installed along with AutoHotkey to find the correct ClassNN value for the control you're trying to hide.

For example, on older versions, you may need to change Button3 to Button4 and Scintilla2 to Scintilla3

1
  • This is exactly what I am looking for - but I have troubles getting autohotkey to work. How exactly do start this script? Does it still work for nppp 7.6.2?
    – mtness
    Aug 3, 2017 at 16:36
1

I've looked through the Notepad++ forums/documentation, and through all the commands/environment variables available within the NPPExec plug-in. I have to conclude that I don't think it's possible to turn off the vertical scroll bar.

1

The document map, is essentially a version of the "clone to another view", with a super tiny locked zoom, and docked to the side, and yeah plus that "view window" highlight ;)

The scrollbar you are seeing, is because you have the text zoomed in your document, and for "reasons" the doc map is picking up that zoom, and math'ing the main doc zoom to the scrollbar element and is showing it much larger than normal.

Try resetting your zoom level (I believe its Ctrl+ Numpad /, or its under view->zoom on the menu), and the scroll bar should go away (or back to it tiny version).

This behaviour should not happen (or the bar should be removed entirely), but I'm not sure anyone has filed a formal bug on sourceforge against this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .