I got a new laptop (macOS Big Sur 11.5.1) and vim does not work correctly in an XQuartz terminal window. Many commands that should erase characters on the screen (such as backspacing while in insert mode, typing D
in command mode to delete a line, typing :refresh!
, etc.) do not have any effect on what the screen displays.
The only fix I've found so far is typing
:!clear
after starting to edit a file, but this must be done every time, and I want a better solution. The post Vim display won't refresh suggested setting the system LANG to ASCII instead of UTF-8, but I was unclear on exactly how to do this.
Various other proposed solutions did not work, including running
vim -u NONE -U NONE -N
Additional information: I am running /bin/bash
with $TERM=xterm;
in vi, :set bs?
returns backspace=2
and :set compatible
returns nocompatible
TERM=vt100
orTERM=vt200
or try with one of those builtin terminals, see:h builtin-terms
(e.g.:set term=builtin_ansi
or:set term=builtin_xterm
).