yaohunzhanyue / collcetion

6 stars 0 forks source link

Using variable in vim key mappings #8

Open yaohunzhanyue opened 4 years ago

yaohunzhanyue commented 4 years ago

https://stackoverflow.com/questions/26853667/using-variable-in-vim-key-mappings

function gotoTab(num)
   execute "normal" a:num."gt"
endfunction
map \t :gotoTab

If I :call goToTab(3), it goes to tab 3.