Discussion:
Warn or disable command + W
Anton Daneyko
2013-01-18 00:56:45 UTC
Permalink
Dear All,
Is there a way to disable the closing of the tab on command+W? If not
disable, then ask for a confirmation?
It's not the first time this happens to me: I accidentally hit command+W
instead of command+2.
Xian Xu
2013-01-18 01:05:11 UTC
Permalink
there already is option for warning i think, in the general settings.
Post by Anton Daneyko
Dear All,
Is there a way to disable the closing of the tab on command+W? If not
disable, then ask for a confirmation?
It's not the first time this happens to me: I accidentally hit command+W
instead of command+2.
Tom Feist
2013-01-18 01:35:38 UTC
Permalink
X-Received: by 10.180.19.73 with SMTP id c9mr195028wie.1.1358472942408;
Thu, 17 Jan 2013 17:35:42 -0800 (PST)
X-BeenThere: iterm2-***@googlegroups.com
Received: by 10.180.92.163 with SMTP id cn3ls110059wib.13.canary; Thu, 17 Jan
2013 17:35:41 -0800 (PST)
X-Received: by 10.180.19.194 with SMTP id h2mr1068884wie.0.1358472941863;
Thu, 17 Jan 2013 17:35:41 -0800 (PST)
X-Received: by 10.180.19.194 with SMTP id h2mr1068883wie.0.1358472941853;
Thu, 17 Jan 2013 17:35:41 -0800 (PST)
Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177])
by gmr-mx.google.com with ESMTPS id d1si35286wie.0.2013.01.17.17.35.41
(version=TLSv1 cipher�DHE-RSA-RC4-SHA bits8/128);
Thu, 17 Jan 2013 17:35:41 -0800 (PST)
Received-SPF: pass (google.com: domain of ***@gmail.com designates 209.85.212.177 as permitted sender) client-ip 9.85.212.177;
Received: by mail-wi0-f177.google.com with SMTP id hm2so2717655wib.4
for <iterm2-***@googlegroups.com>; Thu, 17 Jan 2013 17:35:41 -0800 (PST)
X-Received: by 10.194.238.33 with SMTP id vh1mr11495809wjc.15.1358472941748;
Thu, 17 Jan 2013 17:35:41 -0800 (PST)
Received: from [192.168.1.102] (cpc1-sgyl4-0-0-cust1332.18-2.cable.virginmedia.com. [82.41.29.53])
by mx.google.com with ESMTPS id p2sm1318902wic.7.2013.01.17.17.35.40
(version=TLSv1 cipher�DHE-RSA-RC4-SHA bits8/128);
Thu, 17 Jan 2013 17:35:40 -0800 (PST)
In-Reply-To: <***@mail.gmail.com>
X-Mailer: Apple Mail (2.1283)
X-Original-Sender: ***@gmail.com
X-Original-Authentication-Results: gmr-mx.google.com; spf=pass
(google.com: domain of ***@gmail.com designates 209.85.212.177 as
permitted sender) smtp.mail=***@gmail.com; dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list iterm2-***@googlegroups.com; contact iterm2-discuss+***@googlegroups.com
List-ID: <iterm2-discuss.googlegroups.com>
X-Google-Group-Id: 539954640938
List-Post: <http://groups.google.com/group/iterm2-discuss/post?hl=en_US>, <mailto:iterm2-***@googlegroups.com>
List-Help: <http://groups.google.com/support/?hl=en_US>, <mailto:iterm2-discuss+***@googlegroups.com>
List-Archive: <http://groups.google.com/group/iterm2-discuss?hl=en_US>
Sender: iterm2-***@googlegroups.com
List-Subscribe: <http://groups.google.com/group/iterm2-discuss/subscribe?hl=en_US>,
<mailto:iterm2-discuss+***@googlegroups.com>
List-Unsubscribe: <http://groups.google.com/group/iterm2-discuss/subscribe?hl=en_US>,
<mailto:googlegroups-manage+539954640938+***@googlegroups.com>
Archived-At: <http://permalink.gmane.org/gmane.comp.terminal-emulators.iterm2.general/1745>

I think iTerm only supports internally the confirmation for Cmd-Q, and 'close multiple sessions', neither of
which would trigger for a single tab Cmd-W.

I'm using Butler (http://manytricks.com/butler/) which can support global hotkeys to trap Cmd-W (active only when
iTerm is frontmost app), and ignore it. You could probably do the same, or use the OSX System Preferences keyboard
shortcuts config to rebind it to something less easy to fatfinger.

System Prefs -> Keyboard -> Keyboard Shortcuts -> select 'Application Shortcuts' -> '+', select iTerm from list,
set command to be 'Close', and set a shortcut of something unlikely like Cmd-Ctrl-Shift-W or so.

HTH. Cheers,

Tom
Post by Xian Xu
there already is option for warning i think, in the general settings.
Dear All,
Is there a way to disable the closing of the tab on command+W? If not disable, then ask for a confirmation?
It's not the first time this happens to me: I accidentally hit command+W instead of command+2.
TJ Luoma
2013-01-18 01:58:38 UTC
Permalink
Post by Anton Daneyko
Is there a way to disable the closing of the tab on command+W? If not
disable, then ask for a confirmation?
It's not the first time this happens to me: I accidentally hit command+W
instead of command+2.
There is a preference setting to confirm closing:

Loading Image...
Samuel Gómez
2014-09-29 07:49:17 UTC
Permalink
Post by TJ Luoma
Post by Anton Daneyko
Is there a way to disable the closing of the tab on command+W? If not
disable, then ask for a confirmation?
It's not the first time this happens to me: I accidentally hit command+W
instead of command+2.
http://images.luo.ma/osx/iterm/preferences-session-always-prompt-before-closing.jpg
Upvote
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dave Albert
2014-09-09 06:53:33 UTC
Permalink
You can set an iTerm2 shortcut key to "ignore". Then is you want a short
cut to close a tab/window you could add another shortcut <alt><cmd>w to
close.

<Loading Image...>


<Loading Image...>
Post by Anton Daneyko
Dear All,
Is there a way to disable the closing of the tab on command+W? If not
disable, then ask for a confirmation?
It's not the first time this happens to me: I accidentally hit command+W
instead of command+2.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
王然
2018-08-15 02:27:41 UTC
Permalink
Great! Thank you!

圚 2014幎9月9日星期二 UTC+8䞋午2:53:33Dave Albert写道
Post by Dave Albert
You can set an iTerm2 shortcut key to "ignore". Then is you want a short
cut to close a tab/window you could add another shortcut <alt><cmd>w to
close.
<https://lh4.googleusercontent.com/-JbII5R0nSZA/VA6jNs4nEFI/AAAAAAAACYc/3SLUYLM3oe8/s1600/Screen%2BShot%2B2014-09-09%2Bat%2B07.49.28.png>
<https://lh6.googleusercontent.com/-WPNKwofN57E/VA6j3wnwvrI/AAAAAAAACYk/fQI-6_MUgMo/s1600/Screen%2BShot%2B2014-09-09%2Bat%2B07.52.49.png>
Post by Anton Daneyko
Dear All,
Is there a way to disable the closing of the tab on command+W? If not
disable, then ask for a confirmation?
It's not the first time this happens to me: I accidentally hit command+W
instead of command+2.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...