How would I map ctrl+w+o
to execute :Bonly<CR>
?
I have tried
unmap <C-W>o
map <C-W>o :Bonly<CR>
Save file and source it with so %
, but does not work.
Your mapping (the :unmap
is not necessary) should work with a sequence of Ctrl + W, followed by o.
If you want Ctrl + W followed by Ctrl + O, that'd be <C-w><C-o>
.
In Vim, one can only map Ctrl / Shift / Alt combinations (and not all of them, unfortunately!) with a single key (like W). But there's a plugin that may help you achieve a mapping of all keys pressed simultaneously: arpeggio - Key mappings for simultaneously pressed keys