How to create Shortcut to open a specific file only in Notepad++ v 7.8.2

Viewed 337

I started maintaining work notes in a text document, pre Evernote/OneNote days, say in a file named worknotes.txt. I add code, tips, tricks, queries, urls etc to this file with some comments.

I have been using TextPad where I created a shortcut to always open this file by pressing Ctrl+1. But I can no longer use TextPad and am forced to use Notepad++ (Notepad++ v 7.8.2).

How do I create a shortcut in Notepad++? I tried creating a macro but the macro doesn't work. I created it by menu option Macro - Start Recording - File - Open - type the file name etc and then Stop Recording. To test my macro, I selected menu option Macro - Playback but it didn't work.

To verify that I am recording the macro, I created other simple macros like find/replace certain string OR insert a single quote to the beginning & end of the lines in a file and all these macros run properly.

Any thoughts/tips/pointers?

Thanks.

2 Answers

Instead of a Macro you may want to use Run from the menu and browse for the file and add a shortcut for this as shown in the screenshot below.

enter image description here

Another way to go is to open once the file in Notepad++ and never close it, just save the changes. Then, when you close Notepad++ and reopen it sometimes later, the file is allways present in Notepad++.

For this to work you have to enable Remember current session for next launch:

Settings > Preferences > Backup > Remember current session for next launch

Related