I want to map the tab
key to <c-w>w
to switch windows when there is more than one window open. But if there is only one window but multiple tabs, I want it to detect that there is only one window and to switch tabs instead by mapping to gt
. Note both commands are in the same mode.
Is this possible? I am asking this one key to map to two different choices and the key only performs the second choice when the first one fails.