Error
Error

Reputation: 830

Why does Emacs sometimes overwrite characters when I insert or delete?

This happens for me all the time. Upon insertion/deletion, the positions of other characters in the buffer are not shifted.

For example, with buffer contents this is important content, inserting very before important results in the two words very and important appearing overlapped, like this: this is veryrtant content instead of this is very important content

How can I fix this?

Killing the buffer and reopening of course works.

Upvotes: 2

Views: 1712

Answers (1)

Drew
Drew

Reputation: 30701

It sounds like you have accidentally turned on overwrite-mode.

That command is a toggle. It is bound by default to the keys <insertchar> and <insert>. Typically one of those keys in a keyboard key labeled Insert.

But perhaps your keyboard is sending that key when you do something else.

Does the overwriting ever turn off? If so, that would suggest that you accidentally hit the toggle key a second time.

If not, then perhaps your keyboard or terminal is itself somehow locked in an overwriting mode. Do you see the same behavior outside of Emacs?

Upvotes: 3

Related Questions