You are not logged in.
For a few weeks, I have the strangest issue, on a single computer.
On this computer, when I open a file with Vim, the yank register have a low chance of being pasted on the current position of the cursor, with the number "2" after it.
Eg :
myFile.cxx
#include <algorithm>
#include <iterator>
#include <set>
#include <cmath>my yank register
irrelevant codemyFile.cxx after i open it
irrelevant cod2
#include <algorithm>
#include <iterator>
#include <set>
#include <cmath>I suspected a bug in my .vimrc configuration so i minimized it, but the bug is still present. Here is my current .vimrc, without any .vim folder present.
:syntax on "Turn on syntax highlighting
:set laststatus=2 "Always show status line
:set tabstop=2 "Number of spaces a TAB in the text stands for
:set shiftwidth=2 "Number of spaces used for each step of (auto)indent
:set hlsearch "Have vim highlight the target of a search
:set incsearch "Do incremental searching
:set ruler "Show the cursor position all the time
:set number "Show line numbers
"Converting tabs to spaces
:set expandtab
:set background=darkThe bug appears only after some time of usage after booting and using vim. Once it starts appearing, the chance of seeing it are quite low, but not negligeable, however I have a hard time reproducing it voluntarily.
Last edited by GloW_on_dub (2017-10-20 09:15:44)
Offline
Why do you have colons in front of every option in your rc file?
Offline
TIL you do not need colon in .vimrc
I removed them (and the bug still showed up.)
Last edited by GloW_on_dub (2017-10-19 07:30:21)
Offline
So i just reproduced the bug, and if I press "u" to undo, there is actually two changes. When the paster the yank register, and another one that replace the last character of the line with a 2.
Offline
Is this vim or gvim? The Arch package or someting else? Have you installed any plugins, and if so have you tried disabling them all? Do you have ay software managing your clipboard (autocutsel)? Or any cut & paste stuff in your shell?
Offline
Found it. It was due to some files installed by the docker package in
/usr/share/vim/vimfiles/Should i report that somewhere ?
Edit: It was vim from the arch packages, without plugins. I do have autocutsel.
Last edited by GloW_on_dub (2017-10-20 07:58:59)
Offline
/vim.old/ suggests a manually named directory to me... The bug would be why Vim is sourcing that path.
Offline
I renamed the folder when testing. I've edited my comment.
Offline
If docker put that there, you should open a bug report.
Offline
Nevermind, the problem is still there. I managed to get a log of the command when opening the file using and then close the file directly
vim -W ~/vimcommand2.log myFile.cxxthe result is the following :
^[P1$r2 q^[\:xOne can clearly see the entered comment before my :x, but i have no idea where does it come from.
Edit: I've disabled autocutsel for the time being, no changes.
Edit2 : I'm not alone ! https://www.reddit.com/r/vim/comments/7 … _with_set/
Last edited by GloW_on_dub (2017-10-20 08:48:17)
Offline
From the reddit thread, using
set t_RS=in my .vimrc fixes it.
Offline
Are you setting $TERM anywhere?
Offline
I do not think so, it is set to xterm though.
Offline