Create a shortcut for Notepad++ to reopen a closed tab?

6,968

Solution 1

I have successfully tested the following solution: define this AutoHotKey macro:

SendMode Input                ;just to set up preferred method of sending hotkeys
SetTitleMatchMode, RegEx      ;from now on, windows titles are matched by regex

#IfWinActive Notepad\+\+      ;(open block) the following hotkeys work only in N++
+^t::Send !f1                 ;desired hotkey: Ctrl+Shift+T sends Alt+F, 1
^w::Send ^{F4}                ;bonus: Ctrl+W sends Ctrl+F4 (close file convention)
#IfWinActive                  ;(close #IfWinActive block)

do not forget to run AutoHotKey as administrator.

Using the AHK you can achieve many useful things in N++ and all other applications.

Solution 2

As of now, the shortcut CTRL+SHIFT+T is already the default for reopen closed tabs.

You can always use the ShortCut Mapper : enter image description here

enter image description here

Share:
6,968

Related videos on Youtube

user1776193
Author by

user1776193

Updated on September 18, 2022

Comments

  • user1776193
    user1776193 over 1 year

    To reopen a closed tab in Notepad++ you press ALT+F&1. I was wondering if there was a way to make a macro or program to do this so that I can press link it to the shortcut CTRL+SHIFT+T instead, which is a universal reopen closed tab shortcut I'm used to.

    If anyone could tell me how to make a simple program that does that, and that I could then link to Notepad++ to create a shortcut with, that would teach me a lot and help.

    Thank you for reading

  • user1776193
    user1776193 over 9 years
    I am incredibly grateful. Thank you so much @miroxlav.