I have created a few mappings like so:
:nnoremap <buffer> <leader>xyzABC :call SomeFunc('ABC')<CR>
:nnoremap <buffer> <leader>xyzDE :call SomeFunc('DE')<CR>
:nnoremap <buffer> <leader>xyzFoo18 :call SomeFunc('Foo18')<CR>
:nnoremap <buffer> <leader>xyzBar22 :call SomeFunc('Bar22')<CR>
which works as desired.
I am now looking for a possibility to create a map-template that would allow me to remove the obvious redundant parts of my mappings, something like
:nnoremap <buffer> <leader> xyz? :call SomeFunc(?)<CR>
so that I could pass any value as parameter to SomeFunc
.
Is there such a possibility?
input()
orgetchar()
. However it is probably more normal to use a command instead of a mapping for something that takes a parameter.