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.
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).
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
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.
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
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):
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.
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.