Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
I am incredibly grateful. Thank you so much @miroxlav. –  user1776193 Nov 26 at 22:04
    
@user1776193 - originally I directed you to autohotkey.com. But later I learned that this site deliberately hosts an old version of this excellent software. Current version is at ahkscript.org. Anyway, the solution will work with any of these. –  miroxlav Nov 26 at 22:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.