I am wondering how shall I use tmap
along with <Plug>
.
Here is a snippet of the context where I am using it:
vim9script
import autoload "../lib/foo.vim"
noremap <unique> <script> <Plug>DoSomething :call <SID>foo.DoSomething()
if !hasmapto('<Plug>DoSomething') || empty(mapcheck("<F2>", "t"))
tmap <silent> <F2> <c-w><Plug>DoSomething<cr>
endif
When I use hit <F2>
, nothing happens but a sound is emitted.