Before upgrading to ubuntu 20.04, the line

g/;/s//CTRL V CTRL M/

would replace the ; with a new line.

Now, in ubuntu 20.04 this string translates to


which obviously doesn't have the desired outcome.

How would I get back to the old behavior of vi?

  • Are you sure this is not coming from your config? I'm on 20.10 and can't reproduce. I can't recall having this problem on 20.04 either.
    – Biggybi
    Jan 17 at 12:17
  • 1
    Not that it answers your question, but you can write :%s/;/\r for the same effect
    – D. Ben Knoble
    Jan 17 at 14:20
  • Hi @Biggybi thanks for trying. Definitely not my config file, I've run this without any config file at all. Was it clear from my question that when I wrote CTRL, I meant the control key, not literally CTRL? Also, are you running VIM 8.1. I can't reproduce with vim 8.0
    – Leo Simon
    Jan 18 at 0:11
  • @LeoSimon Clear enough for me! My Vim is up to date. Might be coming from your shell or terminal emulator.
    – Biggybi
    Jan 18 at 3:10
  • 1
    This is a terminal issue. What terminal is this, what is your $TERM configuration? Does it happen with vim --clean? Jan 18 at 7:25

Your Answer

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

Browse other questions tagged or ask your own question.