测试vimrc以查看它是否存在。不确定Vi是否使用了vimrc,我没有一个系统没有Vim(它似乎覆盖了我的Vi)。@FDinoff谢谢。现在可以了。你是说fixdel:)但这会把退格变成del,不是吗?但这会把退格变成del,不是吗? set backsp

测试vimrc以查看它是否存在。不确定Vi是否使用了vimrc,我没有一个系统没有Vim(它似乎覆盖了我的Vi)。@FDinoff谢谢。现在可以了。你是说fixdel:)但这会把退格变成del,不是吗?但这会把退格变成del,不是吗? set backsp,vim,vi,Vim,Vi,测试vimrc以查看它是否存在。不确定Vi是否使用了vimrc,我没有一个系统没有Vim(它似乎覆盖了我的Vi)。@FDinoff谢谢。现在可以了。你是说fixdel:)但这会把退格变成del,不是吗?但这会把退格变成del,不是吗? set backspace=2 set backspace=indent,eol,start *:fix* *:fixdel* :fix[del] Set the value of 't_kD'


测试vimrc以查看它是否存在。不确定Vi是否使用了vimrc,我没有一个系统没有Vim(它似乎覆盖了我的Vi)。@FDinoff谢谢。现在可以了。你是说fixdel:)但这会把退格变成del,不是吗?但这会把退格变成del,不是吗?
set backspace=2
set backspace=indent,eol,start
                            *:fix* *:fixdel*
:fix[del]       Set the value of 't_kD':
                't_kb' is     't_kD' becomes    
                  CTRL-?    CTRL-H
                not CTRL-?  CTRL-?

            (CTRL-? is 0177 octal, 0x7f hex) {not in Vi}

            If your delete key terminal code is wrong, but the
            code for backspace is alright, you can put this in
            your .vimrc:
                :fixdel
            This works no matter what the actual code for
            backspace is.

            If the backspace key terminal code is wrong you can
            use this:
                :if &term == "termname"
                :  set t_kb=^V<BS>
                :  fixdel
                :endif
            Where "^V" is CTRL-V and "<BS>" is the backspace key
            (don't type four characters!).  Replace "termname"
            with your terminal name.

            If your <Delete> key sends a strange key sequence (not
            CTRL-? or CTRL-H) you cannot use ":fixdel".  Then use:
                :if &term == "termname"
                :  set t_kD=^V<Delete>
                :endif
            Where "^V" is CTRL-V and "<Delete>" is the delete key
            (don't type eight characters!).  Replace "termname"
            with your terminal name.


                            *Linux-backspace*
            Note about Linux: By default the backspace key
            produces CTRL-?, which is wrong.  You can fix it by
            putting this line in your rc.local:
                echo "keycode 14 = BackSpace" | loadkeys


                            *NetBSD-backspace*
            Note about NetBSD: If your backspace doesn't produce
            the right code, try this:
                xmodmap -e "keycode 22 = BackSpace"
            If this works, add this in your .Xmodmap file:
                keysym 22 = BackSpace
            You need to restart for this to take effect.