
Better Ctrl-W
1,000+ users
Version: 0.1
Updated: May 2, 2020

Available in the
Chrome Web Store
Chrome Web Store
Install & Try Now!

Paris 2024 Paralympics Silver Pin Badge

30th Birthday gifts for women; 30th Birthday gifts for her; 30 things we love about you; 30 reasons we love you; 30th Birthday; Gift for her

Calculator, Deli Standard Function Desktop Calculators with 12 Digit Large LCD Display, Solar Battery Dual Power Office Calculator, Black

Nvidia GeForce RTX 3090 Founders Edition Graphics Card

Muama Enence Instant Translator For Translating Languages

Men's Fanatics Navy U.S. Paralympics Dreams Are Made Here T-Shirt Size: Small
# Better Ctrl-W
Vim users are used to using the `Ctrl-w` key combination for deleting the last
word when in insert mode. That's no problem for Mac OS users when using
chrome, as the keyboard shortcut for closing a tab is Cmd+w. This is a problem
when using the browser on either Linux or Windows machines, as `Ctrl-w` is the
shortcut for closing a window. So, when editing a text, a Vim user might
accidentally close the current tab by issuing a `Ctrl-w` command, sometimes losing
important text that was being edited.
That annoyance motivated people to discuss solutions on [a StackOverflow thread][1],
in which user [`samson`][2] commented he created [a Chrome extension][3] precisely to:
1. Assign `Ctrl-w` to an extension shortcut that does absolutely nothing
2. Assign a hotkey to close the current tab (I like to use `Alt-w` to mimic Mac OS's `Cmd+w`)
The problem with his extension is that it only works with the currently active tab,
and I regularly use `Shift + Click` to highlight a bunch of tabs, so that I can close them
all at once. His plugin didn't support multiple highlighted tabs, so I created my own.
# Usage
To use this plugin as it's intended, you have to set up the keyboard shortcuts after
installing it. Go to `chrome://extensions/shortcuts` and set the following shortcuts:
1. Assign `Do absolutely nothing` to `Ctrl-w`
2. Assign `Close highlighted tabs` to `Alt-w` or any other key combination of choice
This way, `Ctrl-w` will no longer close the current tab by mistake when editing it,
and you will be able to use `Alt-w` to close either the current of all highlighted tabs.
[1]: https://superuser.com/a/120775 2
[2]: https://superuser.com/users/27 6658/samson
[3]: https://chrome.google.com/webs tore/detail/ctrlw/goejokenmdam capadhgghgpeeaeaaedc?hl=en
Vim users are used to using the `Ctrl-w` key combination for deleting the last
word when in insert mode. That's no problem for Mac OS users when using
chrome, as the keyboard shortcut for closing a tab is Cmd+w. This is a problem
when using the browser on either Linux or Windows machines, as `Ctrl-w` is the
shortcut for closing a window. So, when editing a text, a Vim user might
accidentally close the current tab by issuing a `Ctrl-w` command, sometimes losing
important text that was being edited.
That annoyance motivated people to discuss solutions on [a StackOverflow thread][1],
in which user [`samson`][2] commented he created [a Chrome extension][3] precisely to:
1. Assign `Ctrl-w` to an extension shortcut that does absolutely nothing
2. Assign a hotkey to close the current tab (I like to use `Alt-w` to mimic Mac OS's `Cmd+w`)
The problem with his extension is that it only works with the currently active tab,
and I regularly use `Shift + Click` to highlight a bunch of tabs, so that I can close them
all at once. His plugin didn't support multiple highlighted tabs, so I created my own.
# Usage
To use this plugin as it's intended, you have to set up the keyboard shortcuts after
installing it. Go to `chrome://extensions/shortcuts` and set the following shortcuts:
1. Assign `Do absolutely nothing` to `Ctrl-w`
2. Assign `Close highlighted tabs` to `Alt-w` or any other key combination of choice
This way, `Ctrl-w` will no longer close the current tab by mistake when editing it,
and you will be able to use `Alt-w` to close either the current of all highlighted tabs.
[1]: https://superuser.com/a/120775 2
[2]: https://superuser.com/users/27 6658/samson
[3]: https://chrome.google.com/webs tore/detail/ctrlw/goejokenmdam capadhgghgpeeaeaaedc?hl=en
Related

Keyboard Shortcuts
60,000+

ctrlw
462

Block Ctrl W
916

Hotkeys
3,000+

Disable keyboard shortcuts
40,000+

Shortkeys (Custom Keyboard Shortcuts)
100,000+

QuicKey – The quick tab switcher
10,000+

More Better Ctrl-W
44

Block keys to kiosk mode
7,000+

wasavi
2,000+

Vimsert
54

Surfingkeys
20,000+

AutoControl: Keyboard shortcuts, Mouse gestures
20,000+

Vimium C - All by Keyboard
40,000+

Disable key input
93

Firenvim
2,000+

Custom Hotkeys
1,000+

Shortcut Forwarding Tool
769

Custom Chrome Shortcut Manager
1,000+

Shortcuts for Chromium
183

NewTab Adapter
1,000+

Promnesia
391

Rearrange Tabs
10,000+

Keyboard shortcuts to manage Chrome tabs
5,000+