Suppose you are trying to create a set of mappings such that pressing <C-t>
followed by a number #
would alternate to the respective tab at index #
. I know that using a loop, I can do:
" Map alt-x keys to jump to a tab
for i in range(1, 9)
execute "nmap \<C-t>" . i . "> " . i . "gt"
endfor
Such a solution, however, hast the disadvantage of allowing only a mapping that recognizes up to 9. Is there a more general way to have a mapping depend on a count pressed at the end of the mapping, for instance such that hitting <C-t>14
would focus tab number 14?
Note: the above is just an example, I am interested in this regardless of tabs per se.