To simplify the problem, run following command will get the same error

:py3 print(vim.eval('"\\<bs>"'))

And the real situation is

while 1:
    vimcmd("let nr = getchar()")
    vimcmd("let ch = type(nr) ? nr : nr2char(nr)")
    if vimeval('ch == "\\<bs>"') == '1':
  • Just a guess but maybe related to :h Linux-backspace ...?
    – B Layer
    Commented Dec 21, 2020 at 12:33
  • Other folks have historically had problems with backspace. In addition to the help section above there's :h :fixdel and this from Vim wiki: vim.fandom.com/wiki/Backspace_and_delete_problems . ... perhaps some clues can be found there.
    – B Layer
    Commented Dec 21, 2020 at 12:41
  • @BLayer I have no problem using backspace with vim when editing file. Have you run :py3 print(vim.eval('"\\<bs>"')) and what is the result?
    – ZhiyuanLck
    Commented Dec 21, 2020 at 13:11
  • @BLayer Thanks for the information you provide and sorry for my word. I do not fill you bothered but want to know that you think the possible reason is more about linux or terminals but not vim itself? This is first time I came with this error.
    – ZhiyuanLck
    Commented Dec 21, 2020 at 14:40
  • 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.