Better Ctrl-W
大小:7.07KiB版本:v 0.1更新时间:2021-12-21
Closes highlighted tabs. To replace ctrl-w on Windows/Linux for Vim users!
Better Ctrl-W 的使用方法详解,最全面的教程
Better Ctrl-W 描述:
用户数:1000
分类:开发者工具插件
扩展大小:7.07 KiB
最后更新时间:2021-12-21
版本:v 0.1
Better Ctrl-W 插件简介:
这是来自Chrome商店的 Better Ctrl-W 浏览器插件,您可以在当前页面下载它的最新版本安装文件,并安装在Chrome、Edge等浏览器上。
Better Ctrl-W插件下载方法/流程:
点击下载按钮,关注“扩展迷Extfans”公众号并获取验证码,在网页弹窗中输入验证码,即可下载最新安装文件。
Better Ctrl-W插件安装教程/方法:
(1)将扩展迷上下载的安装包文件(.zip)解压为文件夹,其中类型为“crx”的文件就是接下来需要用到的安装文件
(2) 从设置->更多工具->扩展程序 打开扩展程序页面,或者地址栏输入 Chrome://extensions/ 按下回车打开扩展程序页面
(3) 打开扩展程序页面的“开发者模式”
(4) 将crx文件拖拽到扩展程序页面,
完成安装如有其它安装问题,
请扫描网站底部二维码与客服联系如有疑问请参考:
https://www.extfans.com/installation/# 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