0

How can I make Vim not remove lines below with Ctrl and Left Arrow?

So I just found a dangerous setting with Vim on Linux.

If I press Ctrl and Left Arrow then whole rows below start vanishing. With autosave disabled this could accidentally destroy hours of work.

How do I disable this dangerous behaviour in .vimrc for example?

migrated from superuser.com Jun 1 at 20:13

This question came from our site for computer enthusiasts and power users.

  • With autosave disabled typing ':1,$d<enter>' could also accidently destroy hours of work. What terminal emulation do you use, and is it set correct? – Luuk Jun 1 at 10:53
  • But, undo? This is probably just a misconfigured escape sequence gone awry. @Luuk or :%d, but again, u... – D. Ben Knoble Jun 2 at 2:14
  • 3
    OP, can you add the text displayed when you start vim, press i, Ctrl-V, then Ctrl-Left ? – D. Ben Knoble Jun 2 at 3:15
  • please also show what terminal you are using and what is $TERM set to? – Christian Brabandt Jun 12 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy