0

I just edited a vhost file via command line

sudo vi /srv/.../vhost.conf

After saving and reopening to add something, strange chars where added to the file:

enter image description here

E.g.

AuthName "trac"n

was

AuthName "trac"

before.

Same with AuthUserFile. A ns was added behind it and a path.

Any ideas why this happens and how to avoid it? I also can't remove this chars.

DarkLeafyGreen
  • 283
  • 5
  • 7
  • 23

1 Answers1

2

If your TERM setting is wrong, editors such as vi can give a slightly scrambled display of text due to the use of inappropriate escape codes when redrawing the edited text. Does the problem disappear when you press Ctrl+L or Ctrl+R? Is the problem visible when you cat or head the file after editing?

RedGrittyBrick
  • 3,832
  • 1
  • 17
  • 23