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.

In my favorite editor (vim), I regularly use ctrl-w to execute a certain action. Now, it quite often happens to me that firefox is the active window (on windows) while I still look at vim (thinking vim is the active window) and press ctrl-w which closes firefox. This is not what I want. Is there a way to stop ctrl-w from closing firefox?

Rene

share|improve this question

migrated from stackoverflow.com Nov 3 '09 at 20:14

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

    
Happens to me too every now and then because in IntelliJ IDEA Ctrl-W means something else and gets used a lot... –  Jonik Nov 3 '09 at 20:22
    
Ctrl/Cmd+W is supposed to close the current window/tab on all OS. In fact this is an accesibility bug in IntelliJ products and it already have a bug opened at youtrack.jetbrains.net/issue/… –  sorin Sep 15 '11 at 13:19
add comment

5 Answers

Firefox can be configured not to close the window when you close the last tab. Use about config to set browser.tabs.closeWindowWithLastTabto false.

If you don't even want firefox to close tabs with C-t, then you'll have to use something like keyconfig to change the shortcut.

share|improve this answer
    
Can you garantee it's not malware or something like that? The webpage is obscure, points to a huge forum thread, doesn't say the licence and doen't show the source code. I only found the binary to install... –  user39559 Sep 8 '10 at 9:30
    
What webpage are you talking about? –  Ryan Thompson Sep 11 '10 at 1:16
add comment

Keyconfig extension <-- Could be what your looking for. It lets you change the keyboard bindings in Firefox.

share|improve this answer
    
Can you garantee it's not malware or something like that? The webpage is obscure, points to a huge forum thread, doesn't say the licence and doen't show the source code. I only found the binary to install... –  user39559 Sep 8 '10 at 9:31
add comment

You could write a universal greasemonkey script that embeds a Flash SWF into the page that intercepts keystrokes.

Then again, you're probably not looking for a programmatic solution. Try SuperUser.

share|improve this answer
add comment
up vote 0 down vote accepted

I haven't really found a solution to my problem, but the best thing I could come up with is to press CTRL-SHIFT-T which re-opens the last tab that was closed with CTRL-W.

Unfortunatelly, this may not bring back the text you were typing in a form.

share|improve this answer
add comment

Ctrl-W = Close Tab. It closes the browser when no tabs are left. Open a new blank tab, and it shouldn't cause the whole browser to close (just that tab).

share|improve this answer
    
I assume that closing any tab is not appreciated by the question asker? –  Arjan Nov 3 '09 at 21:50
    
Opening a new tab will help there aswell. Unless he presses it twice. –  Macha Nov 3 '09 at 23:04
add comment

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.