Vim mapping with user input

后端 未结 3 493
傲寒
傲寒 2021-02-05 12:55

I\'m wondering if it\'s possible in Vim to create a mapping (for normal mode) that allows user input before the mapping executes.

I want to create a mapping for a shortc

3条回答
  •  故里飘歌
    2021-02-05 13:05

    see also this answer on vi.stackexchange by @EvergreenTree

    in short: map an expression to make use of input():

    nnoremap ;n "Go" . input("Input your text here: ", "Prepend this string to my input by default -") . " <<- that was your input."

提交回复
热议问题