I'm trying to create a dynamic line to execute
, currently I have
execute a:modes[i] .'noremap <silent> <buffer> '. l:key .' <Esc>:call HardModeEcho(g:HardMode_hardmodeMsg)<CR>'
I'd like that to be something like
execute sprintf(
"%snoremap <silent> <buffer> %s <ESC>:call HardModeEcho(g:HardMode_hardmodeMsg)<CR>",
a:modes[i],
l:key
)
Actually it needs to get even more complex. But, I'd like to start with that. Is there any such functionality in vimscript?