Closes highlighted tabs. To replace ctrl-w on Windows/Linux for Vim users!

Latest Version

Version
0.1
Update
May 2, 2020
Size
7.07KiB
Developer
Category
Users
1,000+
Rating
4.0625 ★
Manifest Version
2
Web Store Status
Languages Support
English (United States)
See more
Permissions
See more

Better Ctrl-W Extension

# 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/1207752
[2]: https://superuser.com/users/276658/samson
[3]: https://chrome.google.com/webstore/detail/ctrlw/goejokenmdamcapadhgghgpeeaeaaedc?hl=en
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "background": {"persistent": false, "scripts": ["background.js"]}, "commands": { "close-highlighted-windows": {"description": "Close highlighted tabs"}, "do-nothing": {"description": "Do absolutely nothing"} }, "description": "Closes highlighted tabs. To replace ctrl-w on Windows/Linux for Vim users!", "icons": {"128": "icons/128.png"}, "manifest_version": 2, "name": "Better Ctrl-W", "version": "0.1"}
Read more

How to download and manually install Better Ctrl-W extension for Chrome

Looking for a way to install Better Ctrl-W extensions for Chrome, you can search for them in the Chrome Web Store, clicking the "Add to Chrome" button, and following the straightforward process.

However, you may need to install Better Ctrl-W extensions manually, this article outlines two simple methods to effortlessly install Better Ctrl-W extensions, whether they come as unpacked folders in compressed formats like .zip or as .crx files.

Method 1: Download Better Ctrl-W extension and manually install through Drag &Drop

If you ever need to manually install a Better Ctrl-W extension for Chrome, don't worry, it's a simple process. Just follow these easy steps, and you will have your extension ready to use in no time.

Step 1: Download the Better Ctrl-W Extension by clicking the "Download CRX" button on the website.

Look for the Better Ctrl-W extension you wish to install. Go to the website and download the Better Ctrl-W extension package, which is usually a .CRX file and comes in a zipped file. Here ".crx" file is the format for Better Ctrl-W extension that contains all the data.

Step 2: Extract &Arrange Files

Once the file is downloaded, extract that file into its own folder. Similarly, give that extension files a permanent home. In other words, keep it in a folder that you don't accidentally delete it because these files will be needed to make that extension work.

Step 3: Go to the Chrome Extensions Page

Open Google Chrome and in the address bar, type chrome://extensions; it will open the Google Chrome extensions page. Make sure that "My extensions" is selected in the sidebar.

Step 4: Drag and Drop the Extension

Now, go to the folder where you extracted the Better Ctrl-W extension and drag &drop the extension file from there anywhere onto the extension page within Google Chrome.

Step 5: Complete the Installation

Once you drag and drop the extension file, follow the steps that Google Chrome takes you through. Similarly, if the extension file is of .crx file format, you will be required to review the permissions and then add the extension.

Now, you can manage that added extension as you would like to with any other Chrome extension that you added through Chrome Webstore. Its icon will also appear in the Google Chrome Menu on the right side of the address bar once you activate it.

Method 2: Download Better Ctrl-W extension for Chrome and install in Developer Mode

This is another method to install Better Ctrl-W extension manually, but the twist is that here, you install by enabling the developer mode option provided in Google Chrome. This mode is commonly used for testing extensions or running unpublished tools.

Step 1: Download the Better Ctrl-W extension file

Select and download the Better Ctrl-W extension by clicking the 'Download CRX' button on the website.

Step 2: Extract the downloaded contents

Convert the file to a ZIP file if it is in CRX format then extract the Better Ctrl-W extension zip file or folder that you downloaded. Make sure you extract it using the same folder name and keep it safely in another folder, so you don't delete it by mistake. The extracted folder will be needed to keep your Better Ctrl-W extension running.

Step 3: Open Chrome Extension Setting Page

In the address bar of Google Chrome, type chrome://extensions and open the Chrome Extension Page.

Step 4: Enable Developer Mode

After opening the Chrome Extension page, look at the top right side, and you will find the toggle option of "Developer mode."Simply enable that developer mode option.

Step 5: Load the Unpacked Extension

Once you enable the developer mode option, you will see the menu of Load Unpacked, Pack Extensions and Update. From that, select the option "Load unpacked."

Step 6: Select the Extension Folder

Once the pop-up opens upon clicking Load unpacked, select the Better Ctrl-W extension directory and click on the "Select Folder "button.

Step 7: Confirm and Install

After you select an extension folder of a Google Chrome extension you're installing manually, confirm its installation for the final time and let the installation complete.

Conclusion

Here we've made a step-by-step guide on How to manually install Better Ctrl-W extension in 2 ways. We hope this guide proves helpful.

Similar Extensions

icon

Keyboard Shortcuts Extension · Productivity 1,000+ 99 ★ 33.04KiB

icon

Block Ctrl W Extension · Developer Tools 1,000+ 4 ★ 16.26KiB

icon

Hotkeys Extension · Accessibility 1,000+ 68 ★ 97.19KiB

icon

Disable keyboard shortcuts Extension · Accessibility 1,000+ 162 ★ 6.29KiB

icon

Shortkeys (Custom Keyboard Shortcuts) Extension · Productivity 1,000+ 739 ★ 255KiB

icon

QuicKey – The quick tab switcher Extension · Productivity 1,000+ 117 ★ 441KiB

icon

Block keys to kiosk mode Extension · Productivity 1,000+ 1 ★ 123KiB

icon

wasavi Extension · Productivity 1,000+ 141 ★ 475KiB

icon

Vimsert Extension · Developer Tools 1,000+ 3 ★ 203KiB

icon

Surfingkeys Extension · Productivity 1,000+ 279 ★ 1.2MiB

icon

AutoControl: Keyboard shortcuts, Mouse gestures Extension · Productivity 1,000+ 334 ★ 1.38MiB

icon

Vimium C - All by Keyboard Extension · Productivity 1,000+ 176 ★ 399KiB

icon

Custom Hotkeys Extension · Productivity 1,000+ 9 ★ 82.95KiB

icon

Disable key input Extension · Accessibility 1,000+ 2 ★ 6.07KiB

icon

Firenvim Extension · Developer Tools 1,000+ 29 ★ 325KiB

icon

Shortcut Forwarding Tool Extension · Productivity 1,000+ 3 ★ 26.26KiB

icon

Custom Chrome Shortcut Manager Extension · Productivity 1,000+ 12 ★ 202KiB

icon

Shortcuts for Chromium Extension · Productivity 1,000+ 5 ★ 537KiB

icon

NewTab Adapter Extension · Productivity 1,000+ 5 ★ 31.19KiB

icon

Keyboard shortcuts to manage Chrome tabs Extension · Productivity 1,000+ 28 ★ 295KiB

icon

Rearrange Tabs Extension · Productivity 1,000+ 153 ★ 7.41KiB

icon

Promnesia Extension · Productivity 1,000+ 2 ★ 429KiB

icon

Emacs shortcuts IME Extension · Accessibility 1,000+ 3 ★ 26.64KiB

User reviews

icon

Elroyskimms (ID: 00000000e2961e1c) Voted 5 ★ - Updated 02/16/2023 This extension does not work automatically after installation. You have to find the "Usage" instructions in the Overview to configure it. The configuration is simple and this extension works perfectly. I can finally use the browser-based terminal application without constantly closing the browser tab.

icon

Michael Chao (ID: 0000008915105431) Voted 1 ★ - Updated 12/18/2022 Although it works, when I want to reset Ctrl W to close tabs, I can't reset it anymore. Users should be warned that the changes cannot be undo!

icon

Miffy Poi (ID: 000000e0622f7b61) Voted 2 ★ - Updated 09/15/2022 does not work on Chrome 105.x 在 Chrome 105.x 版本无法正常工作

icon

Lucy (ID: 0000001fbd470ac9) Voted 1 ★ - Updated 06/12/2022 This extension disables Ctrl-W even outside chrome. Yes, even while using other programs.

icon

Mike Michael (ID: 00000038366ad137) Voted 1 ★ - Updated 05/08/2022 Doesn't work.