Problem with vi opening a new file

Tags: #<Tag:0x00007fe317674538>

Hello,

  • _OpenMandriva Lx version:_3.02

  • Desktop environment (KDE, LXQT…): KDE

  • Description of the issue (screenshots if relevant): When I open a new or empty file with vi the first line of the file shows the characters:
    $q q
    When I insert text into the file these characters disappear.
    I never saw this behaviour in vi. Is this a bug and how can I fix it

Regards,
Albert

Not happening here. Could you show exact command on command line you are using and screenshot of results?

Here’s what I get with:

$ vi

or:

$ vim

Most likely vim got closed that way. Try to delete all those characters and close with:

:q!

that is semi-colon then q then exclamation mark.

Hello ben79,

Here is my test:

$ ls -al | grep tester
$
$ vi tester.txt

Regards,
Albert

Hello ben79,

I can’t delete the $q q characters only overwrite them.

Regards,
Albert

No errors here too! Try to check you configuration file.

OK, thanks for posting the info. When I do it that way I am getting that. I’d say it’s a bug and a bug report needs to be filed.

Doesn’t happen here, but since you can apparently see the characters but not overwrite them, my guess is you’re somehow getting false control characters (newline or color change being shown as “$q q” or so).
What is $TERM set to? Are you using konsole? Or xterm? Or ssh-ing in from another machine running something else?

What happens if you run:

$ vi foo.txt

?

I have the same behaviour. With konsole, xterm, qterminal, also in dolphin (F4 pressed).
It seems a leak of refresh, because disappears splitting the screen (vert or oriz) or increasing (decreasing) the characters.

$ echo $TERM
xterm-256color

It is printable also as .pdf or save output as .txt
but not overwritable.

print.pdf (7.9 KB)
out.txt (4.8 KB)

By me not appear in root konsole, only in user konsole …
and

also with this.

Good work. It does seem perhaps some kind of leak. If I open say:

$ vi test.txt

and see the spurious characters then write that file with :wq then reopen with kwrite I have an empty file with no spurious characters. Whatever that means.

Maybe some obscure configuration?
Try
cd ~
rm -rf .vim .viminfo
(If you have any intentional configuration in there, make backups of those files first)

After rm commands the behaviour is the same, unchanged.

Hello,

Sorry for the late reply.

I opened a bug report: Bug 2221 - Problem with vi opening a new file.

Regards,
Albert

1 Like

Thanks for opening bug report.

It may be a good idea to attach omv-bug-report.log.xz to the bug report.

Developers have requested that we attach that to all bug reports except package requests.

Hello ben79

Done.

Regards,
Albert