move vim-tiny to / filesystem?

Bug #372364 reported by Simon Oosthoek on 2009-05-05
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Debian)
Confirmed
Unknown
vim (Ubuntu)
Wishlist
Unassigned

Bug Description

I've noticed a few times now that nano is the default editor in Ubuntu, which I can to a certain extent understand because of the learning curve of the vi editor. However, I do believe the vi editor is specified in the posix standard as part of the Unix command set.

As a Linux/Unix educator, I tell my students that vi is the one editor that they can depend on to be available on all Unix systems. Unfortunately, ubuntu is no longer a Unix system by _this_ definition :-(

Please include a statically compiled vi-clone in the base-install in /bin/vi to fix this problem!

thank you!

/Simon

Simon Oosthoek (simon-margo) wrote :

It was pointed out to me that a /usr/bin/vi is always available, so posix compliance may not be at issue in that respect.

However, my point was that /bin/vi is not available in a default install and this _is_ a problem if you have a separate /usr partition that has problems being mounted for some reason, there's only nano as a visual editor in /bin/. In emergencies this would be mostly annoying to someone used to using vi, not impossible to overcome (nano can edit files).

I've noticed the problem since about 8.04 LTS, especially when using a command like visudo, which normally uses vi, but somehow decides to use /bin/nano. The problem is not that by default the EDITOR variable is set for all users to /bin/nano.

I hope this clarifies my earlier report somewhat...

/Simon

Krzysztof Klimonda (kklimonda) wrote :

Well, yes - i can confirm this bug. Also vim is probably the only vi clone available in main repository so this is serious issue - think of those system administrators who can't live without it. :)

affects: ubuntu → vim (Ubuntu)
Changed in vim (Ubuntu):
status: New → Confirmed
Colin Watson (cjwatson) wrote :

The comment about POSIX compliance is certainly mistaken, since POSIX specifies normal behaviour of the system rather than what happens in a recovery environment when /usr is missing; vi is also in the User Portability Utilities extension rather than part of core POSIX. That said, I do have some sympathy with the wish that it should be available as a recovery tool. There's no need for it to be statically linked - all the libraries it uses are already in /.

The alternatives system that manages /usr/bin/vi is a bit delicate, though, so I think the best approach here is for me to forward this report to the Debian maintainers.

Changed in vim (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
summary: - /bin/vi missing (POSIX compliance?)
+ move vim-tiny to / filesystem?
Colin Watson (cjwatson) wrote :

As I said in the Debian bug report, note that it may be extremely difficult to provide /bin/vi as something that'll consistently work in rescue mode; if you have a more feature-complete version of vim installed then that should be preferred as the /usr/bin/vi symlink, and it would be a recipe for confusion if /bin/vi and /usr/bin/vi pointed to different things. However, it may at least be possible to provide /bin/vim.tiny, which you could discover by tab-completion or similar.

Changed in vim (Debian):
status: Unknown → New
Simon Oosthoek (simon-margo) wrote :

There may be another reason why nano should not be the only editory in /bin for emergencies...
Nano breaks lines when they become too long and it inserts newlines to do this. For long configuration lines or shell script lines, this breaks stuff just by using the nano editor to edit those lines.

Vi only inserts linefeeds when you explicitly add them by pressing enter in insert mode.

nano -w is enabled by default as of 2.0.9-2, and even before that it was
enabled when running as root as of 1.1.12-1 (before Ubuntu existed).

Simon Oosthoek (simon-margo) wrote :

ok, that's useful (the -w flag being the default). As you can see, I never ran into this issue myself ;-)

Changed in vim (Debian):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.