如何在不必按<esc>的情況下替換N個字符，是否可能？

5r replaces the 5 characters starting from the one under the cursor by the same single character typed after 5r (the new character is repeated 5 times).

最佳答案

nmap  :execute "normal c5l".nr2char(getchar()).nr2char(getchar()).nr2char(getchar()).nr2char(getchar()).nr2char(getchar())