0

When I tried opening vim, it gives me:

bash: vim: command not found...                                                                                       
Install package 'vim-enhanced' to provide command 'vim'? [N/y]

I though that I had vi and I need to install vim but apparently I already have it through the vi command; vi --version yields:

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Sep 20 2024 00:00:00)

So what is the vim-enhanced package and what is the vi command that is preinstalled ?

OS: Fedora 41 Workstation Edition

6
  • FYI, most (if not all) Linux distros come with Vim and provide a vi command for compatibility and convenience that points to (an arbitrarily tiny version of) Vim.
    – Friedrich
    Commented May 23 at 12:45
  • @Friedrich yes I found that (See my own answer below). However I don't know anything about vim-tiny
    – glacier
    Commented May 23 at 13:06
  • I was alluding to Debian's vim-tiny package. My point is: they all have a vi that's in reality a low-feature Vim.
    – Friedrich
    Commented May 23 at 13:37
  • @Friedrich I get it. For example, on Ubuntu 22, vi is a symlink to /etc/alternatives/vim, which is a symlink to /usr/bin/vim.tiny I am going to add that to my anwser if you don't want to create your own
    – glacier
    Commented May 25 at 17:25
  • But I still does not know what is vim-enhanced. My guess is that it is the Fedora version of Debian's vim-basic package.
    – glacier
    Commented May 25 at 17:28

1 Answer 1

1

If you take a look at /usr/bin/vi in Fedora 41, it is a bash script that use vim if it is installed and use /usr/libexec/vi otherwise:

if test -f /usr/bin/vim
then
  exec /usr/bin/vim "$@"
fi

# run vi otherwise
exec /usr/libexec/vi "$@"

And from the official Fedora package of vim-enhanced,

The vim-enhanced package contains a version of VIM with extra, recently introduced features like Python and Perl interpreters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.