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 document
A
, like. . . (Alt–LeftArrow or Ctrl–Pageup)
OR
- switch to document
C
, like. . . (Alt–RightArrow or Ctrl–PageDown).
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, for example:
(Ctrl–Tab and Ctrl–Shift–Tab)
The examples I have found are useful, but not what I want.
Is what I am asking for possible?
Best Answer
Update
The functionality is included by default in Notepad++ v6.4.5 and later. 6.4.5 was released August 9th 2013. Note the current version is 7.5.8 released July 23rd 2018.
If you are using a version of Notepad++ older than v6.4.5, the rest of this answer still applies.
Natively
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
That's it!
Please note that you will no longer have access to the
Ctrl+Tab/Shift+Tab
MRU behaviour now. If, like me, you cannot live without this read on.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
Ctrl+PgUp
andCtrl+PgDn
and you can still switch to your last used tab using the built-in document switcher functionality usingCtrl+Tab
andCtrl+Shift+Tab
- just like Firefox :)