Vi is buggy in OMV4.2

Trying to use vi from command line, e.g.

view filename
gives error messages such as:
E319: Sorry, the command is not available in this version: func! s:StarSetf(ft)
line 51:
E319: Sorry, the command is not available in this version: endfunc
line 2510:
E319: Sorry, the command is not available in this version: func! TestFiletypeFuncs(testlist)

there is screenful of similar messages, which refer to the contents of filetype.vim, that is opened when you use vi/vim/view commands.
If you hit the enter key a few times, vi will open the file.
I tried copying a different filetype.vim over, but that did not help.
I have an application that calls vi to display files, because vi is probably the only editor installed in all linux distros.

vi version 8.2

  • _OpenMandriva Lx version:_4.2
  • Desktop environment (KDE, LXQT…): KDE
1 Like

This is caused by the useless split into vim-minimal and vim-enhanced, and fixed in 4.3.
Install the vim-enhanced package and remove vim-minimal to get rid of the problem (enhanced is what we’re using for development all the time), or try the current 4.3 candidates (4.3 is about to be released).

2 Likes

Thanks for the elucidation. I see now: vi/view is minimal and vim is enhanced. So I’ll have to use vim until new version arrives.
I tried installing a newer build of vi, but dependency failure - it wants glibc 2.34

1 Like

What is vi/view? Where is it? Edit: I’m asking because for QA to know if something is fixed we need to know exactly what “it” is.

The closest I can come up with in our repos is vim-X11 which produces a utility in application menu called GVim. Also it produces all of these:

/usr/bin/evim
/usr/bin/gex
/usr/bin/gview
/usr/bin/gvim
/usr/bin/gvimdiff
/usr/bin/gvimtutor
/usr/bin/vimtutor
/usr/bin/vimx

All of those open here. I did not check how well they work. If I need a gui editor I use Kate (Kwrite is OK too). For cli editor I use either nano (simple) and vim which is actually vim-enhanced or VI-IMproved.

Edit-2: The only spurious output from any of those is this line:

(gvim:2041): dbind-WARNING **: 13:27:25.175: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable

Which is probalby meaningless to a user. Lots and lots of software will output such lines in Linux if you run them from Konsole.

view is a wrapper, which runs vi editor in read-only mode, so it is just a viewer that you scroll up or down.
I know about gvim, kate and lots of others. My original post was about vi, as it is supposed to the be the one editor found in every linux distro, hence it should be something that one can rely on.

1 Like

Forgive for a few dumb questions but I am trying to figure out how one would invoke vi view? And I am about to reveal that I need to use the vim tutorial. What I am researching is how to do the same thing in vim. I know by default vim is in compatibility mode meaning compatible with vi. In a Lx 4.2 system with these packages:

$ rpm -qa | grep vim      
vim-filesystem-8.2.3683-1.noarch
vim-common-8.2.3683-1.x86_64
vim-enhanced-8.2.3683-1.x86_64
vim-minimal-8.2.3683-1.x86_64

So I opened a vim editor in Konsole and typed:

: view /etc/fstab

And /etc/fstab opens in read only. So this would seem to be working if I am interpreting correctly what you mean. To run from Konsole to open a file with vim view mode (read only):

$ vim -R /etc/fstab

or:

$ vi -R /etc/fstab

There is more about view if I type:

: help view

I am I on the right track here @jeepster?

yes that’s right, just use view
Except in my installation, I get a load of error messages before the file is displayed.
I think “rvim” is the equivalent that starts vim read-only.

From what I can see those errors will go away in OM Lx 4.3. Hope I am right.

Developers told us those errors are nothing to worry about, just some code that needs cleaned up. As stated this goes away when user upgrades to Lx 4.3.