I want Ctrl-W to close the current editor tab in IntelliJ IDEA. I use IdeaVim, and somehow that seems to be thwarting my attempts.
Things I've tried that didn't work:
:nmap <C-W> <C-F4>
(the default shortcut of Ctrl-F4 does what I want -- I just want Ctrl-W to do it)I've also tried using the normal vim key of "Ctrl-W c", but this closes all editor tabs, not just the current one.
IdeaVim also doesn't seem to know either :wincmd
or :tabclose
.
Is there any way to set Ctrl-W as a shortcut for closing the current editor tab while IdeaVim is active (ideally in normal mode, but all modes would be fine too)?
I'm using Android Studio, which is built on IntelliJ, and this works for me:
Go to Settings → Other Settings → Vim Emulation, then change the Ctrl+W shortcut to be handled by IDE.
You probably also need to add the Ctrl+W shortcut to Settings → Keymap → Main menu → Window → Editor Tabs → Close. But you said that you have already done it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With