I'd like to make a mapping in Vim so that CtrlTab switches to the previous buffer (:b#
), but then if Tab is pressed again without releasing Ctrl, switches to the next buffer (:bn
) instead.
This is similar to how the AltTab function in MS Windows works. Is there any way to achieve this effect?
I can't seem to find this question asked anywhere else.