Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why vi vs vim ? (I have no experience with vi, only vim.)


vim is the improved version of vi, which is the visual interface to ex, which is the extended editor ed... the one true editor ( https://www.gnu.org/fun/jokes/ed-msg.txt )

You will not infrequently find vim and vi links to the same executable.

    /usr/bin % ls -l ex vi vim
    lrwxr-xr-x  1 root  wheel        3 Aug 24 03:59 ex -> vim
    lrwxr-xr-x  1 root  wheel        3 Aug 24 03:59 vi -> vim
    -rwxr-xr-x  1 root  wheel  5155568 Aug 24 03:59 vim
The difference between which way you have argv[0] slightly changes the functionality... but it's the same thing.

ed remains its own thing.

    /bin % ls -l ed
    -rwxr-xr-x  1 root  wheel  235296 Aug 24 03:59 ed
THE MIGHTY ED HAS SPOKEN!!!

?


To expand on shagie's answer, vi is a separate utility except when it's not (f.g. Linux vi is usually a minimal vim build running in vi-compatible mode). For a more pure taste of vi, install nvi or use vi on *BSD.


In vim there are a lot of emacs-like plug-ins that reimplement functionality found elsewhere.

You can still use the vi style workflow though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: