What is the difference between Vi and Vim?
up vote
141
down vote
favorite
I would appreciate it if someone can let a newbie know what the differences are between vi
and vim
. I've heard Vim is a successor to vi
but whenever I try to open vi
in Ubuntu it opens vim
instead.
vim
add a comment |
up vote
141
down vote
favorite
I would appreciate it if someone can let a newbie know what the differences are between vi
and vim
. I've heard Vim is a successor to vi
but whenever I try to open vi
in Ubuntu it opens vim
instead.
vim
add a comment |
up vote
141
down vote
favorite
up vote
141
down vote
favorite
I would appreciate it if someone can let a newbie know what the differences are between vi
and vim
. I've heard Vim is a successor to vi
but whenever I try to open vi
in Ubuntu it opens vim
instead.
vim
I would appreciate it if someone can let a newbie know what the differences are between vi
and vim
. I've heard Vim is a successor to vi
but whenever I try to open vi
in Ubuntu it opens vim
instead.
vim
vim
edited Nov 24 at 2:24
muru
134k19285484
134k19285484
asked Feb 9 '14 at 3:40
Ethylene
806274
806274
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
up vote
136
down vote
Functionally, vim is almost a proper superset of vi. Therefore, everything that is in vi is available in vim.
Vim adds onto those features. Here are a some of the extended vim features:
- Vim has been ported to a much wider range of OS's than vi.
- Vim includes support (syntax highlighting, code folding, etc) for several popular programming languages (C/C++, Python, Perl, shell, etc).
- Vim integrates with cscope.
- Vim can be used to edit files using network protocols like SSH and HTTP.
- Vim includes multilevel undo/redo.
- Vim allows the screen to be split for editing multiple files.
- Vim can edit files inside a compressed archive (gzip, zip, tar, etc).
- Vim includes a built in diff for comparing files (vimdiff).
- Vim includes support for plugins, and finer control over config and startup files.
- Vim can be scripted with vimscript, or with an external scripting language (e.g. python, perl, shell).
There are many more differences. Refer below sources which are few of good places to start finding out more.
Source: Vim.Org, Vim on Wikpedia.
Hope it helps! :)
add a comment |
up vote
51
down vote
"vi" is an text editor from the early days of Unix. It became quite popular and made its way into the Single Unix Specification (SUS) and POSIX, but wasn't freely available (until 2002).
So several free vi-like editors emerged. Vim (" vi improved") is one of this editors.
As the name suggest it adds lot of functions to the original vi interface.
In Ubuntu Vim is the only vi-like editor installed by default, and so vi
actually starts Vim by default.
Other popular vi-like editors available in Ubuntu are for example nvi
and elvis
.
2
In Ubuntu Vim is the only vi-like editor installed by default
- Xubuntu here:vim: command not found
. Onlyvi
is available.
– Blauhirn
Mar 12 '16 at 18:58
5
@Blauhirn To be fair, technically Xubuntu is not Ubuntu.
– Captain Man
Mar 21 '16 at 16:14
6
@Blauhirn And thatvi
runsvim.tiny
.
– muru
May 26 '16 at 16:08
1
+1 for answering the question about why vi opens vim instead. that is what the OP actually is asking.
– MycrofD
Nov 28 '16 at 6:04
add a comment |
up vote
3
down vote
vi editor is the most popular text editor in Linux. We can say it has a simple black and white screen i.e. if you type any command there is no code highlighting, where as vim is improved version of VI it also has features same like vi but it also has code highlighting.
Both have these 4 basic modes:
- write mode
- command mode
- Visual mode
- escape mode
2
I'm reasonably certain original vi doesn't have Vim's visual mode.
– muru
Apr 11 '17 at 0:39
add a comment |
up vote
1
down vote
There is indeed quite a big difference between them. I use both nvi and vim daily. Neither of them are perfect, but they're still better than anything else is out there.
Vim has more of everything. In addition to syntax hilighting (when compiled with a support for it) it does automatic conversions of charactersets, line-endings and such. It has multiple ways of numbering lines, which is really convenient. Vim certainly has a lot that speaks for it.
Unfortunately vim breaks the vi philosophy by mixing the editor modes and introducing a vast number of useless and redundant functions. Sure it's convenient at first that you can for example move with cursor keys in insert mode, but it also has some really weird unwanted side-effects (for example the . gets quirky and unpredictable).
Vim (while certainly being IMproved as it claims) is also a bloated, weird and inconsistent mixture of a broken vi and a modeless editor. :P
I still love it, though. And you can fix most of that by tuning you configuration ;D
5
Re "Sure it's convenient at first that you can […] move with cursor keys in insert mode" That's the overall purpose of cursor keys nowadays! We're not in the 80s any more and pressing a down arrow should move the cursor down and not put some^B
ad characters on the screen and make it beep.
– PerlDuck
Mar 4 at 15:00
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
136
down vote
Functionally, vim is almost a proper superset of vi. Therefore, everything that is in vi is available in vim.
Vim adds onto those features. Here are a some of the extended vim features:
- Vim has been ported to a much wider range of OS's than vi.
- Vim includes support (syntax highlighting, code folding, etc) for several popular programming languages (C/C++, Python, Perl, shell, etc).
- Vim integrates with cscope.
- Vim can be used to edit files using network protocols like SSH and HTTP.
- Vim includes multilevel undo/redo.
- Vim allows the screen to be split for editing multiple files.
- Vim can edit files inside a compressed archive (gzip, zip, tar, etc).
- Vim includes a built in diff for comparing files (vimdiff).
- Vim includes support for plugins, and finer control over config and startup files.
- Vim can be scripted with vimscript, or with an external scripting language (e.g. python, perl, shell).
There are many more differences. Refer below sources which are few of good places to start finding out more.
Source: Vim.Org, Vim on Wikpedia.
Hope it helps! :)
add a comment |
up vote
136
down vote
Functionally, vim is almost a proper superset of vi. Therefore, everything that is in vi is available in vim.
Vim adds onto those features. Here are a some of the extended vim features:
- Vim has been ported to a much wider range of OS's than vi.
- Vim includes support (syntax highlighting, code folding, etc) for several popular programming languages (C/C++, Python, Perl, shell, etc).
- Vim integrates with cscope.
- Vim can be used to edit files using network protocols like SSH and HTTP.
- Vim includes multilevel undo/redo.
- Vim allows the screen to be split for editing multiple files.
- Vim can edit files inside a compressed archive (gzip, zip, tar, etc).
- Vim includes a built in diff for comparing files (vimdiff).
- Vim includes support for plugins, and finer control over config and startup files.
- Vim can be scripted with vimscript, or with an external scripting language (e.g. python, perl, shell).
There are many more differences. Refer below sources which are few of good places to start finding out more.
Source: Vim.Org, Vim on Wikpedia.
Hope it helps! :)
add a comment |
up vote
136
down vote
up vote
136
down vote
Functionally, vim is almost a proper superset of vi. Therefore, everything that is in vi is available in vim.
Vim adds onto those features. Here are a some of the extended vim features:
- Vim has been ported to a much wider range of OS's than vi.
- Vim includes support (syntax highlighting, code folding, etc) for several popular programming languages (C/C++, Python, Perl, shell, etc).
- Vim integrates with cscope.
- Vim can be used to edit files using network protocols like SSH and HTTP.
- Vim includes multilevel undo/redo.
- Vim allows the screen to be split for editing multiple files.
- Vim can edit files inside a compressed archive (gzip, zip, tar, etc).
- Vim includes a built in diff for comparing files (vimdiff).
- Vim includes support for plugins, and finer control over config and startup files.
- Vim can be scripted with vimscript, or with an external scripting language (e.g. python, perl, shell).
There are many more differences. Refer below sources which are few of good places to start finding out more.
Source: Vim.Org, Vim on Wikpedia.
Hope it helps! :)
Functionally, vim is almost a proper superset of vi. Therefore, everything that is in vi is available in vim.
Vim adds onto those features. Here are a some of the extended vim features:
- Vim has been ported to a much wider range of OS's than vi.
- Vim includes support (syntax highlighting, code folding, etc) for several popular programming languages (C/C++, Python, Perl, shell, etc).
- Vim integrates with cscope.
- Vim can be used to edit files using network protocols like SSH and HTTP.
- Vim includes multilevel undo/redo.
- Vim allows the screen to be split for editing multiple files.
- Vim can edit files inside a compressed archive (gzip, zip, tar, etc).
- Vim includes a built in diff for comparing files (vimdiff).
- Vim includes support for plugins, and finer control over config and startup files.
- Vim can be scripted with vimscript, or with an external scripting language (e.g. python, perl, shell).
There are many more differences. Refer below sources which are few of good places to start finding out more.
Source: Vim.Org, Vim on Wikpedia.
Hope it helps! :)
edited Sep 27 '15 at 3:39
Seth♦
33.5k26109159
33.5k26109159
answered Feb 9 '14 at 4:52
AzkerM
7,73742044
7,73742044
add a comment |
add a comment |
up vote
51
down vote
"vi" is an text editor from the early days of Unix. It became quite popular and made its way into the Single Unix Specification (SUS) and POSIX, but wasn't freely available (until 2002).
So several free vi-like editors emerged. Vim (" vi improved") is one of this editors.
As the name suggest it adds lot of functions to the original vi interface.
In Ubuntu Vim is the only vi-like editor installed by default, and so vi
actually starts Vim by default.
Other popular vi-like editors available in Ubuntu are for example nvi
and elvis
.
2
In Ubuntu Vim is the only vi-like editor installed by default
- Xubuntu here:vim: command not found
. Onlyvi
is available.
– Blauhirn
Mar 12 '16 at 18:58
5
@Blauhirn To be fair, technically Xubuntu is not Ubuntu.
– Captain Man
Mar 21 '16 at 16:14
6
@Blauhirn And thatvi
runsvim.tiny
.
– muru
May 26 '16 at 16:08
1
+1 for answering the question about why vi opens vim instead. that is what the OP actually is asking.
– MycrofD
Nov 28 '16 at 6:04
add a comment |
up vote
51
down vote
"vi" is an text editor from the early days of Unix. It became quite popular and made its way into the Single Unix Specification (SUS) and POSIX, but wasn't freely available (until 2002).
So several free vi-like editors emerged. Vim (" vi improved") is one of this editors.
As the name suggest it adds lot of functions to the original vi interface.
In Ubuntu Vim is the only vi-like editor installed by default, and so vi
actually starts Vim by default.
Other popular vi-like editors available in Ubuntu are for example nvi
and elvis
.
2
In Ubuntu Vim is the only vi-like editor installed by default
- Xubuntu here:vim: command not found
. Onlyvi
is available.
– Blauhirn
Mar 12 '16 at 18:58
5
@Blauhirn To be fair, technically Xubuntu is not Ubuntu.
– Captain Man
Mar 21 '16 at 16:14
6
@Blauhirn And thatvi
runsvim.tiny
.
– muru
May 26 '16 at 16:08
1
+1 for answering the question about why vi opens vim instead. that is what the OP actually is asking.
– MycrofD
Nov 28 '16 at 6:04
add a comment |
up vote
51
down vote
up vote
51
down vote
"vi" is an text editor from the early days of Unix. It became quite popular and made its way into the Single Unix Specification (SUS) and POSIX, but wasn't freely available (until 2002).
So several free vi-like editors emerged. Vim (" vi improved") is one of this editors.
As the name suggest it adds lot of functions to the original vi interface.
In Ubuntu Vim is the only vi-like editor installed by default, and so vi
actually starts Vim by default.
Other popular vi-like editors available in Ubuntu are for example nvi
and elvis
.
"vi" is an text editor from the early days of Unix. It became quite popular and made its way into the Single Unix Specification (SUS) and POSIX, but wasn't freely available (until 2002).
So several free vi-like editors emerged. Vim (" vi improved") is one of this editors.
As the name suggest it adds lot of functions to the original vi interface.
In Ubuntu Vim is the only vi-like editor installed by default, and so vi
actually starts Vim by default.
Other popular vi-like editors available in Ubuntu are for example nvi
and elvis
.
answered Feb 9 '14 at 4:37
Florian Diesch
64k16160177
64k16160177
2
In Ubuntu Vim is the only vi-like editor installed by default
- Xubuntu here:vim: command not found
. Onlyvi
is available.
– Blauhirn
Mar 12 '16 at 18:58
5
@Blauhirn To be fair, technically Xubuntu is not Ubuntu.
– Captain Man
Mar 21 '16 at 16:14
6
@Blauhirn And thatvi
runsvim.tiny
.
– muru
May 26 '16 at 16:08
1
+1 for answering the question about why vi opens vim instead. that is what the OP actually is asking.
– MycrofD
Nov 28 '16 at 6:04
add a comment |
2
In Ubuntu Vim is the only vi-like editor installed by default
- Xubuntu here:vim: command not found
. Onlyvi
is available.
– Blauhirn
Mar 12 '16 at 18:58
5
@Blauhirn To be fair, technically Xubuntu is not Ubuntu.
– Captain Man
Mar 21 '16 at 16:14
6
@Blauhirn And thatvi
runsvim.tiny
.
– muru
May 26 '16 at 16:08
1
+1 for answering the question about why vi opens vim instead. that is what the OP actually is asking.
– MycrofD
Nov 28 '16 at 6:04
2
2
In Ubuntu Vim is the only vi-like editor installed by default
- Xubuntu here: vim: command not found
. Only vi
is available.– Blauhirn
Mar 12 '16 at 18:58
In Ubuntu Vim is the only vi-like editor installed by default
- Xubuntu here: vim: command not found
. Only vi
is available.– Blauhirn
Mar 12 '16 at 18:58
5
5
@Blauhirn To be fair, technically Xubuntu is not Ubuntu.
– Captain Man
Mar 21 '16 at 16:14
@Blauhirn To be fair, technically Xubuntu is not Ubuntu.
– Captain Man
Mar 21 '16 at 16:14
6
6
@Blauhirn And that
vi
runs vim.tiny
.– muru
May 26 '16 at 16:08
@Blauhirn And that
vi
runs vim.tiny
.– muru
May 26 '16 at 16:08
1
1
+1 for answering the question about why vi opens vim instead. that is what the OP actually is asking.
– MycrofD
Nov 28 '16 at 6:04
+1 for answering the question about why vi opens vim instead. that is what the OP actually is asking.
– MycrofD
Nov 28 '16 at 6:04
add a comment |
up vote
3
down vote
vi editor is the most popular text editor in Linux. We can say it has a simple black and white screen i.e. if you type any command there is no code highlighting, where as vim is improved version of VI it also has features same like vi but it also has code highlighting.
Both have these 4 basic modes:
- write mode
- command mode
- Visual mode
- escape mode
2
I'm reasonably certain original vi doesn't have Vim's visual mode.
– muru
Apr 11 '17 at 0:39
add a comment |
up vote
3
down vote
vi editor is the most popular text editor in Linux. We can say it has a simple black and white screen i.e. if you type any command there is no code highlighting, where as vim is improved version of VI it also has features same like vi but it also has code highlighting.
Both have these 4 basic modes:
- write mode
- command mode
- Visual mode
- escape mode
2
I'm reasonably certain original vi doesn't have Vim's visual mode.
– muru
Apr 11 '17 at 0:39
add a comment |
up vote
3
down vote
up vote
3
down vote
vi editor is the most popular text editor in Linux. We can say it has a simple black and white screen i.e. if you type any command there is no code highlighting, where as vim is improved version of VI it also has features same like vi but it also has code highlighting.
Both have these 4 basic modes:
- write mode
- command mode
- Visual mode
- escape mode
vi editor is the most popular text editor in Linux. We can say it has a simple black and white screen i.e. if you type any command there is no code highlighting, where as vim is improved version of VI it also has features same like vi but it also has code highlighting.
Both have these 4 basic modes:
- write mode
- command mode
- Visual mode
- escape mode
edited Apr 11 '17 at 0:40
muru
134k19285484
134k19285484
answered May 22 '16 at 4:23
kiran kumar reddy
391
391
2
I'm reasonably certain original vi doesn't have Vim's visual mode.
– muru
Apr 11 '17 at 0:39
add a comment |
2
I'm reasonably certain original vi doesn't have Vim's visual mode.
– muru
Apr 11 '17 at 0:39
2
2
I'm reasonably certain original vi doesn't have Vim's visual mode.
– muru
Apr 11 '17 at 0:39
I'm reasonably certain original vi doesn't have Vim's visual mode.
– muru
Apr 11 '17 at 0:39
add a comment |
up vote
1
down vote
There is indeed quite a big difference between them. I use both nvi and vim daily. Neither of them are perfect, but they're still better than anything else is out there.
Vim has more of everything. In addition to syntax hilighting (when compiled with a support for it) it does automatic conversions of charactersets, line-endings and such. It has multiple ways of numbering lines, which is really convenient. Vim certainly has a lot that speaks for it.
Unfortunately vim breaks the vi philosophy by mixing the editor modes and introducing a vast number of useless and redundant functions. Sure it's convenient at first that you can for example move with cursor keys in insert mode, but it also has some really weird unwanted side-effects (for example the . gets quirky and unpredictable).
Vim (while certainly being IMproved as it claims) is also a bloated, weird and inconsistent mixture of a broken vi and a modeless editor. :P
I still love it, though. And you can fix most of that by tuning you configuration ;D
5
Re "Sure it's convenient at first that you can […] move with cursor keys in insert mode" That's the overall purpose of cursor keys nowadays! We're not in the 80s any more and pressing a down arrow should move the cursor down and not put some^B
ad characters on the screen and make it beep.
– PerlDuck
Mar 4 at 15:00
add a comment |
up vote
1
down vote
There is indeed quite a big difference between them. I use both nvi and vim daily. Neither of them are perfect, but they're still better than anything else is out there.
Vim has more of everything. In addition to syntax hilighting (when compiled with a support for it) it does automatic conversions of charactersets, line-endings and such. It has multiple ways of numbering lines, which is really convenient. Vim certainly has a lot that speaks for it.
Unfortunately vim breaks the vi philosophy by mixing the editor modes and introducing a vast number of useless and redundant functions. Sure it's convenient at first that you can for example move with cursor keys in insert mode, but it also has some really weird unwanted side-effects (for example the . gets quirky and unpredictable).
Vim (while certainly being IMproved as it claims) is also a bloated, weird and inconsistent mixture of a broken vi and a modeless editor. :P
I still love it, though. And you can fix most of that by tuning you configuration ;D
5
Re "Sure it's convenient at first that you can […] move with cursor keys in insert mode" That's the overall purpose of cursor keys nowadays! We're not in the 80s any more and pressing a down arrow should move the cursor down and not put some^B
ad characters on the screen and make it beep.
– PerlDuck
Mar 4 at 15:00
add a comment |
up vote
1
down vote
up vote
1
down vote
There is indeed quite a big difference between them. I use both nvi and vim daily. Neither of them are perfect, but they're still better than anything else is out there.
Vim has more of everything. In addition to syntax hilighting (when compiled with a support for it) it does automatic conversions of charactersets, line-endings and such. It has multiple ways of numbering lines, which is really convenient. Vim certainly has a lot that speaks for it.
Unfortunately vim breaks the vi philosophy by mixing the editor modes and introducing a vast number of useless and redundant functions. Sure it's convenient at first that you can for example move with cursor keys in insert mode, but it also has some really weird unwanted side-effects (for example the . gets quirky and unpredictable).
Vim (while certainly being IMproved as it claims) is also a bloated, weird and inconsistent mixture of a broken vi and a modeless editor. :P
I still love it, though. And you can fix most of that by tuning you configuration ;D
There is indeed quite a big difference between them. I use both nvi and vim daily. Neither of them are perfect, but they're still better than anything else is out there.
Vim has more of everything. In addition to syntax hilighting (when compiled with a support for it) it does automatic conversions of charactersets, line-endings and such. It has multiple ways of numbering lines, which is really convenient. Vim certainly has a lot that speaks for it.
Unfortunately vim breaks the vi philosophy by mixing the editor modes and introducing a vast number of useless and redundant functions. Sure it's convenient at first that you can for example move with cursor keys in insert mode, but it also has some really weird unwanted side-effects (for example the . gets quirky and unpredictable).
Vim (while certainly being IMproved as it claims) is also a bloated, weird and inconsistent mixture of a broken vi and a modeless editor. :P
I still love it, though. And you can fix most of that by tuning you configuration ;D
answered Mar 4 at 14:24
gen
211
211
5
Re "Sure it's convenient at first that you can […] move with cursor keys in insert mode" That's the overall purpose of cursor keys nowadays! We're not in the 80s any more and pressing a down arrow should move the cursor down and not put some^B
ad characters on the screen and make it beep.
– PerlDuck
Mar 4 at 15:00
add a comment |
5
Re "Sure it's convenient at first that you can […] move with cursor keys in insert mode" That's the overall purpose of cursor keys nowadays! We're not in the 80s any more and pressing a down arrow should move the cursor down and not put some^B
ad characters on the screen and make it beep.
– PerlDuck
Mar 4 at 15:00
5
5
Re "Sure it's convenient at first that you can […] move with cursor keys in insert mode" That's the overall purpose of cursor keys nowadays! We're not in the 80s any more and pressing a down arrow should move the cursor down and not put some
^B
ad characters on the screen and make it beep.– PerlDuck
Mar 4 at 15:00
Re "Sure it's convenient at first that you can […] move with cursor keys in insert mode" That's the overall purpose of cursor keys nowadays! We're not in the 80s any more and pressing a down arrow should move the cursor down and not put some
^B
ad characters on the screen and make it beep.– PerlDuck
Mar 4 at 15:00
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f418396%2fwhat-is-the-difference-between-vi-and-vim%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown