I want to use one editor which is available across all the system. Someone told me VIM is best and i tried on ubuntu and VIM was not there but vi is there.
SO which one should i use
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
vi will be more common, but theyre not 100% the same. The basics are, yet vim (vi improved) is as the name suggests more advanced when it comes to features.
If you want to use an editor that is available at most systems, use vi. If you want to use one with more functions, use vim, but be prepared to install it or fall back to vi on certain systems where it is not installed. That being said, the basics really are the same so it shouldnt be too much of a hassle to fall back to vi when the need occurs.
I suggest installing and using Vim on systems you use frequently, especially if you plan to use it for coding. Vim offers many useful features not available in Vi, but the basic text manipulation commands will be the same, so you'll have no problems falling back to Vi when necessary.
You should also note that although Vi is installed by default in most (if not all) Unix-based systems, Vim is available for all these platforms, and has in addition been ported to more non-Unix systems than its older counterpart.
As for why you should consider Vim over Vi at all, here are some features to consider:
<i>some text</i>and run the command
dit(d'elete i'nside t'ag), we're left with
<i></i>. If we used
datinstead (d'elete a t'ag), the
<i></i>tags would have been deleted as well. Similarly, you can delete the contents between double-quotes (
di"), brackets (
di[), or even entire paragraphs (
For a more comprehensive list of differences, start up Vim in a terminal and run