Discussion:
The vim display issue on OpenBSD
Nan Xiao
2018-03-09 07:19:32 UTC
Permalink
Hi all,

Greetings from me!

I meet a weird issue: there is a file which contains only "1":

# cat a
1

While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.

Does anyone bump into this issue? Thanks very much in advance!

P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.

Best Regards
Nan Xiao
Stuart Henderson
2018-03-09 10:43:09 UTC
Permalink
Post by Nan Xiao
Hi all,
Greetings from me!
# cat a
1
While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.
Does anyone bump into this issue? Thanks very much in advance!
P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.
Best Regards
Nan Xiao
I don't see it here. Are you sure there's nothing strange in the file?

hexdump -C a

Do you have a .vimrc? If so, does it still happen if you move it out the way?
Nan Xiao
2018-03-09 13:32:13 UTC
Permalink
Hi Stuart,

hexdump doesn't show anything exceptionally:
# hexdump -C a
00000000 31 0a |1.|
00000002

I don't have .vimrc, just a .viminfo and .vim directory:

# ls -alth .vim*
-rw------- 1 root wheel 725B Mar 9 21:27 .viminfo

.vim:
total 24
drwx------ 7 root wheel 1.0K Mar 9 21:28 ..
drwxr-xr-x 2 root wheel 512B Aug 29 2017 .
-rw-r--r-- 1 root wheel 93B Aug 29 2017 .netrwhist

Thanks!
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi all,
Greetings from me!
# cat a
1
While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.
Does anyone bump into this issue? Thanks very much in advance!
P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.
Best Regards
Nan Xiao
I don't see it here. Are you sure there's nothing strange in the file?
hexdump -C a
Do you have a .vimrc? If so, does it still happen if you move it out the way?
Stuart Henderson
2018-03-09 13:37:35 UTC
Permalink
No ideas then, sorry.

Maybe try it from ports/packages instead in case there's anything
funny with your build? (I know that's not a standard ports one
because we didn't have 8.0.1476).
Post by Nan Xiao
Hi Stuart,
# hexdump -C a
00000000 31 0a |1.|
00000002
# ls -alth .vim*
-rw------- 1 root wheel 725B Mar 9 21:27 .viminfo
total 24
drwx------ 7 root wheel 1.0K Mar 9 21:28 ..
drwxr-xr-x 2 root wheel 512B Aug 29 2017 .
-rw-r--r-- 1 root wheel 93B Aug 29 2017 .netrwhist
Thanks!
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi all,
Greetings from me!
# cat a
1
While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.
Does anyone bump into this issue? Thanks very much in advance!
P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.
Best Regards
Nan Xiao
I don't see it here. Are you sure there's nothing strange in the file?
hexdump -C a
Do you have a .vimrc? If so, does it still happen if you move it out the way?
Nan Xiao
2018-03-09 13:41:48 UTC
Permalink
Hi Stuart,

I am very sorry, and the VIM's version is 8.0.987. I reported wrong
version from other machine.

I should installed it from ports.

Thanks!
Best Regards
Nan Xiao
Post by Stuart Henderson
No ideas then, sorry.
Maybe try it from ports/packages instead in case there's anything
funny with your build? (I know that's not a standard ports one
because we didn't have 8.0.1476).
Post by Nan Xiao
Hi Stuart,
# hexdump -C a
00000000 31 0a |1.|
00000002
# ls -alth .vim*
-rw------- 1 root wheel 725B Mar 9 21:27 .viminfo
total 24
drwx------ 7 root wheel 1.0K Mar 9 21:28 ..
drwxr-xr-x 2 root wheel 512B Aug 29 2017 .
-rw-r--r-- 1 root wheel 93B Aug 29 2017 .netrwhist
Thanks!
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi all,
Greetings from me!
# cat a
1
While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.
Does anyone bump into this issue? Thanks very much in advance!
P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.
Best Regards
Nan Xiao
I don't see it here. Are you sure there's nothing strange in the file?
hexdump -C a
Do you have a .vimrc? If so, does it still happen if you move it out the way?
Solène Rapenne
2018-03-09 14:25:28 UTC
Permalink
Post by Nan Xiao
Hi all,
Greetings from me!
# cat a
1
While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.
Does anyone bump into this issue? Thanks very much in advance!
P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.
Best Regards
Nan Xiao
hello,

Do you have this error only with this file ? If you do

echo 2 > file

and then you use vim on this file, does it display 1 ?
Could you try with another terminal emulator or from a tty ?

I have no idea about this problem but it may gives some clues.
Andreas Kusalananda Kähäri
2018-03-09 17:20:52 UTC
Permalink
Post by Nan Xiao
Hi all,
Greetings from me!
# cat a
1
While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.
Does anyone bump into this issue? Thanks very much in advance!
P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.
Best Regards
Nan Xiao
Vim will decrement the value under the cursor if you press Ctrl+X (and
increment it with Ctrl+A).

Are you pressing Ctrl+X, or is something sending this to your Vim
session upon starting Vim? Is there something in your .vimrc file that
causes the equivalent of pressing Ctrl+X to be applied on startup?
--
Andreas Kusalananda Kähäri,
National Bioinformatics Infrastructure Sweden (NBIS),
Uppsala University, Sweden.
Nan Xiao
2018-03-12 01:14:16 UTC
Permalink
Hi all,

Thanks for all your kind response!

I reinstall vim:

# pkg_add vim
quirks-2.367 signed on 2017-10-03T11:21:28Z
Ambiguous: choose package for vim
a 0: <None>
1: vim-8.0.0987p0-gtk2
2: vim-8.0.0987p0-gtk2-lua
3: vim-8.0.0987p0-gtk2-perl-python-ruby
4: vim-8.0.0987p0-gtk2-perl-python3-ruby
5: vim-8.0.0987p0-no_x11
6: vim-8.0.0987p0-no_x11-lua
7: vim-8.0.0987p0-no_x11-perl-python-ruby
8: vim-8.0.0987p0-no_x11-perl-python3-ruby
9: vim-8.0.0987p0-no_x11-ruby
Your choice: 1
vim-8.0.0987p0-gtk2: ok

I selected vim-8.0.0987p0-gtk2, and the error occurs.

Since I use terminal, I shouldn't install vim-8.0.0987p0-gtk2?

Thanks in advance!
Best Regards
Nan Xiao


On Sat, Mar 10, 2018 at 1:20 AM, Andreas Kusalananda Kähäri
Post by Andreas Kusalananda Kähäri
Post by Nan Xiao
Hi all,
Greetings from me!
# cat a
1
While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.
Does anyone bump into this issue? Thanks very much in advance!
P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.
Best Regards
Nan Xiao
Vim will decrement the value under the cursor if you press Ctrl+X (and
increment it with Ctrl+A).
Are you pressing Ctrl+X, or is something sending this to your Vim
session upon starting Vim? Is there something in your .vimrc file that
causes the equivalent of pressing Ctrl+X to be applied on startup?
--
Andreas Kusalananda Kähäri,
National Bioinformatics Infrastructure Sweden (NBIS),
Uppsala University, Sweden.
Nan Xiao
2018-03-12 01:18:11 UTC
Permalink
Hi all,

Update:

I try to install vim-8.0.0987p0-no_x11, still the same problem, thanks!
Best Regards
Nan Xiao
Post by Nan Xiao
Hi all,
Thanks for all your kind response!
# pkg_add vim
quirks-2.367 signed on 2017-10-03T11:21:28Z
Ambiguous: choose package for vim
a 0: <None>
1: vim-8.0.0987p0-gtk2
2: vim-8.0.0987p0-gtk2-lua
3: vim-8.0.0987p0-gtk2-perl-python-ruby
4: vim-8.0.0987p0-gtk2-perl-python3-ruby
5: vim-8.0.0987p0-no_x11
6: vim-8.0.0987p0-no_x11-lua
7: vim-8.0.0987p0-no_x11-perl-python-ruby
8: vim-8.0.0987p0-no_x11-perl-python3-ruby
9: vim-8.0.0987p0-no_x11-ruby
Your choice: 1
vim-8.0.0987p0-gtk2: ok
I selected vim-8.0.0987p0-gtk2, and the error occurs.
Since I use terminal, I shouldn't install vim-8.0.0987p0-gtk2?
Thanks in advance!
Best Regards
Nan Xiao
On Sat, Mar 10, 2018 at 1:20 AM, Andreas Kusalananda Kähäri
Post by Andreas Kusalananda Kähäri
Post by Nan Xiao
Hi all,
Greetings from me!
# cat a
1
While use vim to open it, it displays "0". I find the number behind
cursor will decrease 1.
Does anyone bump into this issue? Thanks very much in advance!
P.S., my OpenBSD is 6.2 release, and vim is 8.0.1476.
Best Regards
Nan Xiao
Vim will decrement the value under the cursor if you press Ctrl+X (and
increment it with Ctrl+A).
Are you pressing Ctrl+X, or is something sending this to your Vim
session upon starting Vim? Is there something in your .vimrc file that
causes the equivalent of pressing Ctrl+X to be applied on startup?
--
Andreas Kusalananda Kähäri,
National Bioinformatics Infrastructure Sweden (NBIS),
Uppsala University, Sweden.
jungle Boogie
2018-03-12 16:51:30 UTC
Permalink
Post by Nan Xiao
Hi all,
I try to install vim-8.0.0987p0-no_x11, still the same problem, thanks!
I am using vim-8.0.1589-no_x11-python3 without any issues on openBSD
snapshot from this morning.
Post by Nan Xiao
Best Regards
Nan Xiao
Nan Xiao
2018-03-13 02:50:57 UTC
Permalink
I tried other options, but still the same problem ...
Best Regards
Nan Xiao
Post by jungle Boogie
Post by Nan Xiao
Hi all,
I try to install vim-8.0.0987p0-no_x11, still the same problem, thanks!
I am using vim-8.0.1589-no_x11-python3 without any issues on openBSD
snapshot from this morning.
Post by Nan Xiao
Best Regards
Nan Xiao
Ville Valkonen
2018-03-13 05:47:57 UTC
Permalink
Hi,

can you please show your ~/.vimrc?

Thanks,
Ville
Post by Nan Xiao
I tried other options, but still the same problem ...
Best Regards
Nan Xiao
Post by jungle Boogie
Post by Nan Xiao
Hi all,
I try to install vim-8.0.0987p0-no_x11, still the same problem, thanks!
I am using vim-8.0.1589-no_x11-python3 without any issues on openBSD
snapshot from this morning.
Post by Nan Xiao
Best Regards
Nan Xiao
Nan Xiao
2018-03-13 05:58:22 UTC
Permalink
Hi Ville,

I don't have ~/.vimrc, only a ~/.viminfo, thanks!
Best Regards
Nan Xiao
Post by Ville Valkonen
Hi,
can you please show your ~/.vimrc?
Thanks,
Ville
Post by Nan Xiao
I tried other options, but still the same problem ...
Best Regards
Nan Xiao
Post by jungle Boogie
Post by Nan Xiao
Hi all,
I try to install vim-8.0.0987p0-no_x11, still the same problem, thanks!
I am using vim-8.0.1589-no_x11-python3 without any issues on openBSD
snapshot from this morning.
Post by Nan Xiao
Best Regards
Nan Xiao
Stuart Henderson
2018-03-13 10:39:23 UTC
Permalink
Post by Nan Xiao
Hi Ville,
I don't have ~/.vimrc, only a ~/.viminfo, thanks!
Perhaps something in your environment is causing a problem.

Does it also happen if you run "env -i vim $filename"?
Nan Xiao
2018-03-13 13:59:07 UTC
Permalink
Hi Stuart,

No! It doesn't happen when run "env -i vim $filename".

But check my environment:

# env
_=/usr/bin/env
LOGNAME=root
HOME=/root
SSH_TTY=/dev/ttyp0
LSCOLORS=fxexcxdxbxegedabagacad
SHELL=/bin/ksh
PS1=$USER:$PWD#
TERM=xterm
SSH_CONNECTION=10.217.243.14 63260 10.217.242.61 22
LD_LIBRARY_PATH=/usr/local/lib
MAIL=/var/mail/root
SSH_CLIENT=10.217.243.14 63260 22
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/jre-1.8.0/bin
USER=root

Don't know what causes the problem.
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi Ville,
I don't have ~/.vimrc, only a ~/.viminfo, thanks!
Perhaps something in your environment is causing a problem.
Does it also happen if you run "env -i vim $filename"?
Stuart Henderson
2018-03-13 14:24:21 UTC
Permalink
Post by Nan Xiao
Hi Stuart,
No! It doesn't happen when run "env -i vim $filename".
# env
_=/usr/bin/env
LOGNAME=root
HOME=/root
SSH_TTY=/dev/ttyp0
LSCOLORS=fxexcxdxbxegedabagacad
SHELL=/bin/ksh
PS1=$USER:$PWD#
TERM=xterm
SSH_CONNECTION=10.217.243.14 63260 10.217.242.61 22
LD_LIBRARY_PATH=/usr/local/lib
MAIL=/var/mail/root
SSH_CLIENT=10.217.243.14 63260 22
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/jre-1.8.0/bin
USER=root
Don't know what causes the problem.
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi Ville,
I don't have ~/.vimrc, only a ~/.viminfo, thanks!
Perhaps something in your environment is causing a problem.
Does it also happen if you run "env -i vim $filename"?
The only thing that looks odd in there is the LD_LIBRARY_PATH setting
though I don't see how that would be triggering this..

Other thing I'm wondering is what terminal it is.

Perhaps running it under script(1) and examining ./typescript would
give another clue.
Nan Xiao
2018-03-14 01:24:17 UTC
Permalink
Hi Stuart,

Thanks for your reply!

When I don't use SSH client, the vim display correct result.

My OS is Windows, and my SSH client is Cygwin, it display 0.

I try putty and MobaXterm, both display:

1q q


Except vim, vi display correct for all the SSH clients. So it seems
interesting.
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi Stuart,
No! It doesn't happen when run "env -i vim $filename".
# env
_=/usr/bin/env
LOGNAME=root
HOME=/root
SSH_TTY=/dev/ttyp0
LSCOLORS=fxexcxdxbxegedabagacad
SHELL=/bin/ksh
PS1=$USER:$PWD#
TERM=xterm
SSH_CONNECTION=10.217.243.14 63260 10.217.242.61 22
LD_LIBRARY_PATH=/usr/local/lib
MAIL=/var/mail/root
SSH_CLIENT=10.217.243.14 63260 22
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/jre-1.8.0/bin
USER=root
Don't know what causes the problem.
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi Ville,
I don't have ~/.vimrc, only a ~/.viminfo, thanks!
Perhaps something in your environment is causing a problem.
Does it also happen if you run "env -i vim $filename"?
The only thing that looks odd in there is the LD_LIBRARY_PATH setting
though I don't see how that would be triggering this..
Other thing I'm wondering is what terminal it is.
Perhaps running it under script(1) and examining ./typescript would
give another clue.
Nan Xiao
2018-03-14 09:46:24 UTC
Permalink
Hi all,

I guess this issue (https://github.com/vim/vim/issues/2008) may be the cause.

My vim version is 8.0.987.
Best Regards
Nan Xiao
Post by Nan Xiao
Hi Stuart,
Thanks for your reply!
When I don't use SSH client, the vim display correct result.
My OS is Windows, and my SSH client is Cygwin, it display 0.
1q q
Except vim, vi display correct for all the SSH clients. So it seems
interesting.
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi Stuart,
No! It doesn't happen when run "env -i vim $filename".
# env
_=/usr/bin/env
LOGNAME=root
HOME=/root
SSH_TTY=/dev/ttyp0
LSCOLORS=fxexcxdxbxegedabagacad
SHELL=/bin/ksh
PS1=$USER:$PWD#
TERM=xterm
SSH_CONNECTION=10.217.243.14 63260 10.217.242.61 22
LD_LIBRARY_PATH=/usr/local/lib
MAIL=/var/mail/root
SSH_CLIENT=10.217.243.14 63260 22
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/jre-1.8.0/bin
USER=root
Don't know what causes the problem.
Best Regards
Nan Xiao
Post by Stuart Henderson
Post by Nan Xiao
Hi Ville,
I don't have ~/.vimrc, only a ~/.viminfo, thanks!
Perhaps something in your environment is causing a problem.
Does it also happen if you run "env -i vim $filename"?
The only thing that looks odd in there is the LD_LIBRARY_PATH setting
though I don't see how that would be triggering this..
Other thing I'm wondering is what terminal it is.
Perhaps running it under script(1) and examining ./typescript would
give another clue.
Loading...