How can I switch to the document to the left or right of the current document in Notepad++? For example, if I have documents A, B, and C open, and I'm currently editing B, I would like a shortcut to be able to switch to A (Alt-LeftArrow or Ctrl-Pageup) or C (Alt-RightArrow or Ctrl-PageDown). Is this possible? All I've found is a way to switch to next or previous documents based on the "history" of when the document was last opened (Ctrl-Tab and Ctrl-Shift-Tab), which are useful, but not what I want.
migrated from stackoverflow.com May 3 '10 at 17:25
This question came from our site for professional and enthusiast programmers.
Using AutoHotkey, if the mouse back and forward buttons are already mapped by the user for a different purpose, lukescammell's solution can be modified to use Browser_Back and Browser_Forward instead:
These are extra media buttons found on some multimedia keyboards for going back and forward in a Web browser.
You can do this natively in Notepad++, but in order to replicate the behaviour of Firefox, you need to disable the document switcher and MRU behaviour.
Disable MRU functionality
Create the Ctrl+PGUP/PGDN shortcuts
Please note that you will no longer have access to the
Another (better) option
Notepad++ defaults to using the back and forward buttons on a mouse to switch to the adjacent left and right tabs, so if you are a fan of AutoHotkey, you can use this little script:
This won't interfere with other programs and enables to you have your cake and eat it! You can navigate left and right through adjacent the tabs using
Settings -> Preferences -> MISC, Document switcher (Ctrl-TAB). Uncheck the "Enable" checkbox. Documents will then be navigated to in the order they appear in the tabs.
You can also assign different keyboard shortcuts to next/previous document if you prefer.