[CentOS] vi defaults in 6.x
Markus Falb
markus.falb at fasel.at
Sun Aug 26 12:26:48 UTC 2012
On 20.8.2012 19:16, Gordon Messmer wrote:
> On 08/20/2012 04:07 AM, Joerg Schilling wrote:
>> Gordon Messmer<yinyang at eburg.com> wrote:
>>
>>>> Actually, it's a shell alias. And then, only if "vim" is installed,
>>>> which it isn't in some configurations. IIRC, desktop systems have him
>>>> by default, but server installations do not.
>> It is neither a symlink nor a shell alias - execpt maybe for platforms that
>> for some reason don't include vi.
>
> On a CentOS system, "vi" will be a shell alias when the "vim" package is
> installed. Otherwise it will be a variant of "vim" which is more
> compatible with the POSIX description of "vi" (though not 100%). As we
> are discussing CentOS, I believe my statements did not require
> correction. Thanks.
I got curious ;-)
vim-minimal installs /bin/vi
vim-enhanced installs /usr/bin/vim and sets the alias (the "vim" package)
[falb at xxx ~]$ which vi
alias vi='vim'
/usr/bin/vim
[falb at xxx ~]$ which vim
/usr/bin/vim
[falb at xxx ~]$ whereis vi
vi: /bin/vi /usr/share/man/man1/vi.1.gz /usr/share/man/man1p/vi.1p.gz
But the alias is not set for root!
[root at xxx ~]# which vi
/bin/vi
[root at xxx ~]# which vim
/usr/bin/vim
--
Kind Regards, Markus Falb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20120826/23f4c0c7/attachment.sig>
More information about the CentOS
mailing list