Vim Recall繁體中文

Set key code of <Del>

:fixdel

Example

Normal 0 / 2

Set key code of <Del>.

Terminal key codes

t_kb
CTRL-? (0x7f)
t_kD
incorrect
Before & after

Before

Terminal key codes

t_kb
CTRL-? (0x7f)
t_kD
incorrect

After

Terminal key codes

t_kb
CTRL-? (0x7f)
t_kD
CTRL-H (0x08)

Documentation-backed illustration. terminal Vim exposes t_kb/t_kD and Backspace is correctly configured as CTRL-?. :fixdel sets the Delete terminal code to CTRL-H because the prepared Backspace code is CTRL-?. Primary help: :fixdel.

Sample buffer
alpha
beta
gamma
Cursor on line 1, column 1
Details & Vim help

Set key code of <Del>. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :fix[del] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.