0

Sometimes when I have a vim instance open for a long time, I'll notice that newlines no longer reset the column in external commands:

:! echo a; echo b
[No write since last change]
a
 b

Press ENTER or type command to continue

Manually inserting carriage returns still works, but that's not always an option.

If I background vim with CTRL-Z, I see the same behaviour from my shell, which I can fix with a reset.

zsh: suspended vim .
                    %
$ echo a; echo b
a
 b
$ reset
$ echo a; echo b
a
b

But the issue returns if I foreground vim

$ fg
[1]  + continued  vim .
...
:! echo a; echo b
[No write since last change]
a
 b

Press ENTER or type command to continue

I tried :redraw!, but no change.

I can always close my vim instance and open a new one, but I'd like to know if there's a fix I can make within vim.

  • 1
    Hm... do you have some mappings with escape on the left-hand side? Can you reproduce this with vim --clean or vim -u NONE? – D. Ben Knoble Jul 16 at 23:40
  • I’ve yet to discover the steps to recreate; but I’ll keep trying – rampion Jul 16 at 23:41

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.