FS#20778 - [vi] replace ex-vi with vi from busybox.
Attached to Project:
Arch Linux
Opened by Florian Pritz (bluewind) - Wednesday, 08 September 2010, 14:32 GMT
Last edited by Stéphane Gaudreault (stephane) - Wednesday, 16 February 2011, 21:49 GMT
Opened by Florian Pritz (bluewind) - Wednesday, 08 September 2010, 14:32 GMT
Last edited by Stéphane Gaudreault (stephane) - Wednesday, 16 February 2011, 21:49 GMT
|
Details
vi is more or less unusable and buggy whereas busybox vi is
working quite well. busybox also has a lot of tools which
might come in handy when there are library problems (busybox
is static) and it's small.
Please replace vi in core with busybox (all features, not stripped down) and generate a symlink vi -> busybox. |
This task depends upon
Closed by Stéphane Gaudreault (stephane)
Wednesday, 16 February 2011, 21:49 GMT
Reason for closing: Won't fix
Additional comments about closing: We examined all option for VI replacement. None are satisfactory.
http://mailman.archlinux.org/pipermail/a rch-dev-public/2011-February/019368.html
Wednesday, 16 February 2011, 21:49 GMT
Reason for closing: Won't fix
Additional comments about closing: We examined all option for VI replacement. None are satisfactory.
http://mailman.archlinux.org/pipermail/a rch-dev-public/2011-February/019368.html
shared: 43KB (links to libc.so.6 only)
static: 653KB
Attaching the busybox .config file for this build. An alternative would be to use the mkinitcpio-busybox binary, but that has some useful features disabled (namely Unicode, iirc).
I'd like to hear what Tobias thinks here - anyway, nobody seems happy with ex-vi.
And here seems to be the list of limitations:
* It does not support all common vi commands.
* It does not support the '!' command to execute a child process and capture its output
* It also lacks the normal vi crash recovery feature.
* It always assumes a vt102 type terminal (emulator)
* Only very few settings are configurable via :set
* .exrc configuration and configuration via environment variables are not supported
* Line marks are not correctly adjusted if lines are inserted or deleted before the mark.
* Only whole-line undo (uppercase 'U'), no last-change undo (lowercase 'u') is supported.
* Search is done case-insensitive.
* Command-counts need to prefix a command, and
* command counts for a, c, d, i, r, y and several other commands are not supported.
* Ex commands are not supported.
some stuff is serious though: command count (At least I use that a lot, and there are some build scripts or at least used to be that use ex-commands, they would then require vim?)
Tobias, another question: Why did we drop nvi in favor of ex-vi? I find ex-vi very hard to use, but I'm ususally not a vi user - I only use it when nothing else is available.
Here is my take on it:
The original purpose of all of that, and I think it still holds up, was to ship a reasonable small vi with the (very) core of Archlinux. This is a minimum, mainly to say we have it, to make it compliant. There are only a few viable solutions out of it:
- stick with the minimalistic ex-vi. Cumbersome but bearable. If you need more, install vim but I wouldn't wanna have the (huge!) vim runtime in core
- stick vi built from the vim sources into core. this vi is small and quite usable but the runtime that comes with it is huge (>30 MB after deflation, IIRC) (we had that before, the second downside is that every (g)vim is held up by the testing for the core vi package)
- built a custom minimized vi from vim sources with a custom stripped runtime. That means building a compliment runtime for the actual vim. That's a lot and cumbersome work - leave alone error prone. Did someone say, Debian?
- find a better minimalistic and maintained!! vi clone. Altogether, I think busybox is too limited over ex-vi, but might be less buggy. I can't say. I just install vim where I need it but I get by with ex-vi if I have too.
- Our current vim + vim-runtime is just under 30MB, but I admit that's huge. Maybe we can let the vim package replace vi and create a symlink so if you can vim installed it gets used instead of ex-vi. Already happened to me that some program started vi (forgot to set $EDITOR; $EDITOR got removed by su -l; ..) and sometimes the bug I mentioned earlier appeared.
- building vi from the vim source is too much work imho
Currently I believe the best solution is to either not change anything or let vim replace vi. (conflicts=vi; provides=vi; symlink)
Thomas Bächler (brain0) asked the same question https://bugs.archlinux.org/task/20778#comment65858
How about vim-slim https://github.com/BlackIkeEagle/herecura/tree/master/herecura-stable/vim
./configure --prefix=/usr --localstatedir=/var/lib/vim \
--mandir=/usr/share/man --with-compiledby=ArchLinux \
--with-features=tiny --disable-gpm --enable-acl --with-x=no \
--disable-gui --enable-multibyte --disable-cscope \
--disable-netbeans --disable-perlinterp --disable-pythoninterp \
--disable-rubyinterp --enable-luainterp=no
Download Size : 381,44 K
Installed Size : 1000,00 K
It doesn't need the vim-runtime.
Is it too big? How to make it play nice with vim (full edition)/gvim?