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.

For example, I often hit ctrl+w along with ctrl+s when I'm saving documents, causing them to save and then close. I can reopen them if I use the recent files list, but I am wondering if Notepad++ has an "open last closed document" shortcut, like ctrl+shift+t in firefox.

I was unable to find anything on Google.

Thanks!

share|improve this question

migrated from stackoverflow.com Dec 15 '10 at 1:22

This question came from our site for professional and enthusiast programmers.

    
Why not just get into the habit of saving with C-s? –  ldigas Nov 26 '11 at 20:53
    
Just a tangent.. I think the default "open last closed document" shortcut in Firefox (at least for FF8 stable) is Ctrl + Shift + N, not T? Did you use Menu Editor to possibly change the shortcut binding? –  White Phoenix Nov 26 '11 at 22:48
    
Ctrl+Shift+T is Undo Close Tab while Ctrl+Shift+N is Undo Close Window (see Keyboard shortcuts) –  JustinStolle Nov 27 '11 at 7:40

5 Answers 5

up vote 14 down vote accepted

Its actually Alt+F, then hit number 1.

When you close a file, NP++ (for better or worse) sticks it at the top of the "recent files" list in the File menu.

That recent files list is actually a mindfuck, considering it only adds an entry to that list if you explicitly close it (so if you Save As, your file WILL NOT go to that list,) and it deletes an entry from that list as soon as you open the file (so you have to close it again to make it appear in the list).

share|improve this answer
1  
I love you! I accidentally hit the bloody "Close All BUT This" options, instead of "Close" and it closed about 20 file (and I needed all of them). Well, I had to still re-order them into views, but that is okay. better than hunting them through the NppFTP list! Thanks! ♥ –  destiel starship May 5 '12 at 19:16
    
note that the shortcut depends on the language (portuguese would be Alt+A 1) –  jonathan Jun 4 '13 at 14:48

I have been googling all day to no avail, Notepad++ just can't do this on it's own. By chance I was playing with AutoIt today, and I built a tiny little standalone script that will send the alt+f & 1 keystrokes to open the most recent document. All you have to do it save it's path to the commands via the run menu, then assign it a shortcut key in the Modify Shortcut/Delete Command dialogue at the bottom of the Run menu.

Script is here: http://tylerthomas.me/Projects/Archive/Misc/NP++Reopen.exe

Source is here: http://tylerthomas.me/Projects/Archive/Misc/NP++Reopen.au3

Now my NP++ tabs work just like my chrome tabs! I can't post any more links but the above is explained in detail in the Notepad++ documentation on commands.

share|improve this answer
1  
Also see sourceforge.net/projects/npppythonscript for another route to this behavior. –  TylerT Nov 30 '11 at 0:28

No, there isn't. Not sure if it's doable with a plugin though, I'm alright with the recent files list.

share|improve this answer
    
Maybe it's time to write my own plugin, then! Thanks for the confirmation. –  Erty Dec 14 '10 at 22:48

I don't believe it does; I haven't seen one while using it. However, I believe Geany does, and you may want to look into that editor. It doesn't support as many languages as Notepad++, but it has some more features that you might like, and I think it has this feature as well.

Edit: Yes, there's a mapping for "re-open last close tab" in Geany, so it seems to support that feature.

share|improve this answer

You can anytime remap the keys.

EDIT: This will also help you see all the commands it supports.

share|improve this answer
    
Ah, but I like ctrl+w, since it's standard across applications. This shortcut (reopen last closed) would be handy in more than just my example instance. Still, that's a good idea: +1 –  Erty Dec 14 '10 at 22:46
    
Reply to edit: I checked out the list of commands, but there was nothing close to what I was looking for. Ah well. –  Erty Dec 14 '10 at 22:51
    
@Erty: well.. by misclicking Ctrl+W you'll soon develop a reflex that will solve the problem. You just have to be patient and get angry each time it happens :) –  ruslik Dec 14 '10 at 22:54
1  
It's something that reminds me of #define retrun return :) –  ruslik Dec 14 '10 at 22:56
    
Never heard of #define retrun return, but I think I may have to start using that. +1 –  Erty Dec 14 '10 at 22:57

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.