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?
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:
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.
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
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.