The Computer Oracle

Vim to replace Vi

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Luau

--

Chapters
00:00 Vim To Replace Vi
00:16 Answer 1 Score 29
00:24 Answer 2 Score 12
00:50 Answer 3 Score 11
01:04 Answer 4 Score 3
01:18 Thank you

--

Full question
https://superuser.com/questions/27091/vi...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #vim #vi

#avk47



ANSWER 1

Score 29


In your .bashrc:

alias vi=vim



ANSWER 2

Score 12


If you need the changes only for your id, and within a terminal session: alias vi to vim as suggested by AI.

If you want a system-wide change on your machine, soft-link to vim in /usr/local/bin:

sudo ln -s `which vim` /usr/local/bin/vi

Note: Programs can ignore any aliases on vi by running command vi or \vi instead of just vi.




ANSWER 3

Score 11


If it is a Debian or Ubuntu system, and you want to make this change system wide, you should use update-alternatives (specify with the --config editor options, and you should be golden)




ANSWER 4

Score 3


Some dists use vim:s old school mode where it behaves like vi.

check if your .vimrc contains

set nocompatible

I have been fooled by this a couple of times....