Vi vs vim, or, is there any reason why I would ever want to use vi?
Clash Royale CLAN TAG#URR8PPP
up vote
79
down vote
favorite
I know a bit about *NIX text editors (currently migrating from nano
to vim
), and, after looking around a bit on the Unix & Linux SE, have noticed that vi
is used instead of 'vim' in a fair number of questions. I know that 'vim' stands for 'Vi IMproved', and, with that in mind, am wondering why anyone would rather use vi instead of vim. Does vi have any significant advantage over vim?
Edit: I think that my question is being misinterpreted. I know that vim is, for the most part, significantly more powerful and feature-complete then vi is. What I want to know is if there are any possible cases where vi has an advantage over vim, such as less memory use, prevalence on *nix systems, etc.
vim vi
 |Â
show 2 more comments
up vote
79
down vote
favorite
I know a bit about *NIX text editors (currently migrating from nano
to vim
), and, after looking around a bit on the Unix & Linux SE, have noticed that vi
is used instead of 'vim' in a fair number of questions. I know that 'vim' stands for 'Vi IMproved', and, with that in mind, am wondering why anyone would rather use vi instead of vim. Does vi have any significant advantage over vim?
Edit: I think that my question is being misinterpreted. I know that vim is, for the most part, significantly more powerful and feature-complete then vi is. What I want to know is if there are any possible cases where vi has an advantage over vim, such as less memory use, prevalence on *nix systems, etc.
vim vi
21
The nice thing aboutvi
is you can expect it to be on every POSIX compliant system.
â jordanm
Jan 12 '13 at 7:06
1
Actually, Ubuntu standard installation includesvi
and notvim
.. Ubuntu is one of the most user friendly distro btw ;-)
â amyassin
Jan 16 '13 at 19:53
9
@amyassin This is incorrect, Ubuntu, like most Linux distributions,includesvim
.vi
is just a symbolic link that eventually point tovim
in the default installation.
â jlliagre
Aug 30 '15 at 0:21
Not quite sure but I think vim is heavier. This caracteristic is important on light platforms (e.g. raspberry pi)
â Manu H
Sep 12 '15 at 7:38
My advice is: Use Vim, but learnvi
using the POSIX specifications forvi
. That way you have portable knowledge as well as knowing Vim extensions.
â Wildcard
Jan 25 '16 at 11:51
 |Â
show 2 more comments
up vote
79
down vote
favorite
up vote
79
down vote
favorite
I know a bit about *NIX text editors (currently migrating from nano
to vim
), and, after looking around a bit on the Unix & Linux SE, have noticed that vi
is used instead of 'vim' in a fair number of questions. I know that 'vim' stands for 'Vi IMproved', and, with that in mind, am wondering why anyone would rather use vi instead of vim. Does vi have any significant advantage over vim?
Edit: I think that my question is being misinterpreted. I know that vim is, for the most part, significantly more powerful and feature-complete then vi is. What I want to know is if there are any possible cases where vi has an advantage over vim, such as less memory use, prevalence on *nix systems, etc.
vim vi
I know a bit about *NIX text editors (currently migrating from nano
to vim
), and, after looking around a bit on the Unix & Linux SE, have noticed that vi
is used instead of 'vim' in a fair number of questions. I know that 'vim' stands for 'Vi IMproved', and, with that in mind, am wondering why anyone would rather use vi instead of vim. Does vi have any significant advantage over vim?
Edit: I think that my question is being misinterpreted. I know that vim is, for the most part, significantly more powerful and feature-complete then vi is. What I want to know is if there are any possible cases where vi has an advantage over vim, such as less memory use, prevalence on *nix systems, etc.
vim vi
vim vi
edited Sep 12 '15 at 5:29
Drarp
53
53
asked Jan 12 '13 at 4:21
fouric
87231021
87231021
21
The nice thing aboutvi
is you can expect it to be on every POSIX compliant system.
â jordanm
Jan 12 '13 at 7:06
1
Actually, Ubuntu standard installation includesvi
and notvim
.. Ubuntu is one of the most user friendly distro btw ;-)
â amyassin
Jan 16 '13 at 19:53
9
@amyassin This is incorrect, Ubuntu, like most Linux distributions,includesvim
.vi
is just a symbolic link that eventually point tovim
in the default installation.
â jlliagre
Aug 30 '15 at 0:21
Not quite sure but I think vim is heavier. This caracteristic is important on light platforms (e.g. raspberry pi)
â Manu H
Sep 12 '15 at 7:38
My advice is: Use Vim, but learnvi
using the POSIX specifications forvi
. That way you have portable knowledge as well as knowing Vim extensions.
â Wildcard
Jan 25 '16 at 11:51
 |Â
show 2 more comments
21
The nice thing aboutvi
is you can expect it to be on every POSIX compliant system.
â jordanm
Jan 12 '13 at 7:06
1
Actually, Ubuntu standard installation includesvi
and notvim
.. Ubuntu is one of the most user friendly distro btw ;-)
â amyassin
Jan 16 '13 at 19:53
9
@amyassin This is incorrect, Ubuntu, like most Linux distributions,includesvim
.vi
is just a symbolic link that eventually point tovim
in the default installation.
â jlliagre
Aug 30 '15 at 0:21
Not quite sure but I think vim is heavier. This caracteristic is important on light platforms (e.g. raspberry pi)
â Manu H
Sep 12 '15 at 7:38
My advice is: Use Vim, but learnvi
using the POSIX specifications forvi
. That way you have portable knowledge as well as knowing Vim extensions.
â Wildcard
Jan 25 '16 at 11:51
21
21
The nice thing about
vi
is you can expect it to be on every POSIX compliant system.â jordanm
Jan 12 '13 at 7:06
The nice thing about
vi
is you can expect it to be on every POSIX compliant system.â jordanm
Jan 12 '13 at 7:06
1
1
Actually, Ubuntu standard installation includes
vi
and not vim
.. Ubuntu is one of the most user friendly distro btw ;-)â amyassin
Jan 16 '13 at 19:53
Actually, Ubuntu standard installation includes
vi
and not vim
.. Ubuntu is one of the most user friendly distro btw ;-)â amyassin
Jan 16 '13 at 19:53
9
9
@amyassin This is incorrect, Ubuntu, like most Linux distributions,includes
vim
. vi
is just a symbolic link that eventually point to vim
in the default installation.â jlliagre
Aug 30 '15 at 0:21
@amyassin This is incorrect, Ubuntu, like most Linux distributions,includes
vim
. vi
is just a symbolic link that eventually point to vim
in the default installation.â jlliagre
Aug 30 '15 at 0:21
Not quite sure but I think vim is heavier. This caracteristic is important on light platforms (e.g. raspberry pi)
â Manu H
Sep 12 '15 at 7:38
Not quite sure but I think vim is heavier. This caracteristic is important on light platforms (e.g. raspberry pi)
â Manu H
Sep 12 '15 at 7:38
My advice is: Use Vim, but learn
vi
using the POSIX specifications for vi
. That way you have portable knowledge as well as knowing Vim extensions.â Wildcard
Jan 25 '16 at 11:51
My advice is: Use Vim, but learn
vi
using the POSIX specifications for vi
. That way you have portable knowledge as well as knowing Vim extensions.â Wildcard
Jan 25 '16 at 11:51
 |Â
show 2 more comments
9 Answers
9
active
oldest
votes
up vote
56
down vote
accepted
vi
is (also) a POSIX standard editor. There are plenty of implementations and vim
is likely the most popular at least on Linux.
While many traditional Unix compliant OSes provide vi
implementations very close to the standard, vim
has added a lot of extra features that make it a double-edged sword.
Of course, these extensions are usually designed to ease the editing process and provide useful features and functionalities. However, once you are used to some of them (not the cosmetic ones like syntax coloring but those that change the editor's behavior) you can easily forget they are specific; and using a different implementation, including the ones based on the original BSD code can be very frustrating. The opposite is also true.
This is quite similar to the issue that happens with scripts using non POSIX bashisms faced to more orthodox shell implementations like dash
or ksh
.
add a comment |Â
up vote
27
down vote
No vi doesn't have any significant advantage over vim rather its the other way around.
Vim has more advantages then Vi.
You may be interested in : Why, oh WHY, do those #?@! nutheads use vi?
Edit also read : Is learning VIM worth the effort?
4
Yep. I don't use any IDE because the editors they force you to use just isn't Vim.
â Keith
Jan 12 '13 at 7:51
1
@Keith I use both Xcode and Eclipse and I'm still able to do editing with vi only.
â ott--
Jan 12 '13 at 9:39
@Keith SlickEdit has a great Vim emulation, and IDEA's is coming close to it. Also, Visual Studio has ViEmu.
â demonkoryu
Apr 23 '13 at 13:50
1
IntellIJ also has a nice vim plugin overriding the standard editor's behavior.
â JulienD
Aug 26 '15 at 6:59
add a comment |Â
up vote
23
down vote
After spending a large fraction of my life (not including childhood) editing
comfortably with Vim, I spent about a month only using vi. In doing so, I
realized that I had been dependent on Vim for all of my text modification
needs. Before my trip with vi, whenever I had to substitute some text or
perform a similar operation in a large group of files, I would just open up the
files in Vim and run a :bufdo
command, and whenever I had to indent or format
some files, I would open them up in Vim and use Vim's =
and gw
commands. I
was Vim-dependent. After realizing vi did not have these commands, I was forced
to perform bulk text transformations with sed
and learned a great deal about
other programs such as awk
and indent
. Though I switched back to using Vim
in the end, the knowledge I gained by using a less featured editor was
substantial and has proved to be extremely useful. In addition to learning
about tools outside of a text editor, I also became better acquainted with vi.
Whenever I am working on a new system or a server that doesn't have Vim, I feel
much more comfortable using vi than I did before my month-long excursion.
Also, last month I installed Linux on a cheap WM8650 tablet and found there to
be a noticeable performance difference between Vim and vi, so I tend to use vi
on the tablet.
2
I find that this is a common issue in IT- the tools that help us can also obscure things we'd be better off learning.
â danstermeister
Dec 17 '15 at 17:11
Actually, handling in-place file editing on many files can't portably be done with Awk or Sed either. (The-i
switch on both is a GNU extension.) But you can use them portably with something likefor f in *; do printf '%sn' '%!sed -e '''some sed command'' x | ex "$f"; done
â Wildcard
Nov 10 '16 at 12:38
add a comment |Â
up vote
11
down vote
I would have a hard time living without vim but I can't stand vi. However, learning the former will at least leave you with an idea of how to deal with the later when that's all that is available.
The vim interface by default is actually pretty close to vi. If I'm working on a system with vim the first thing I do is add this stuff to ~/.vimrc
:
syntax enable
set nocp
set wildmenu
There's a bunch of other stuff I prefer -- nowrap and numbering on, etc -- but never mind. "syntax enable" just turns on basic syntax highlighting (somewhat beefier: filetype plugin on
is fundamental too); "nocp" turns off vi compatibility and it is this that starts to distinguish vim from ye olde vi (eg, it enables showmode
which makes the whole experience somewhat more human, since you now have some clue about whether you are in command or ~INSERT~ mode). "wildmenu" just gives you a horizontal completion menu when doing some things, which makes life easier too.
The text editing facilities of vim are second to none -- other than emacs, I've never seen or heard of a piece of software that comes close. They are not easy to learn, but once you know them, they are much faster than mouse menus to use and much more dynamic than the simple key macro alternatives in mouse menu based interfaces. For programming, I sometimes use vim alongside an IDE like Eclipse, but I do most of the work in vim.
If you take that path, lol, look into the autocompletion and taglist plugins. And beware the dark side.
I always addset mouse=a
too.
â ott--
Jan 12 '13 at 16:36
Regarding your programming comment, you may find eclim interesting...
â ire_and_curses
Feb 4 '13 at 23:41
@ire_and_curses : haven't tried it. Eclipse and vim both monitor the source files and allow them to be updated externally, and flipping from one desktop to another is flipping from one desktop to another. Seems like quite the idea tho.
â goldilocks
Feb 5 '13 at 0:33
Although I don't think this answer should be the chosen answer (since it's biased), it's exactly the type of perspective that is helpful for understanding the differences. Thanks for taking a position.
â geneorama
Jul 19 '15 at 17:24
add a comment |Â
up vote
8
down vote
The advantage is that vi usually preinstalled in enterprise UNIX like AIX or Solaris. Besides vim is not accessible on installation media.
add a comment |Â
up vote
1
down vote
I have noticed that I only choose Vi
over VIM
when I am copying and pasting a text document or config file that I have used cat
command. This is because when I try to ctrl-c
and then ctrl-v
into the VIM
opened document, it forces all lines to have a comment infront of them. So when I use Vi
to ctrl-v
or paste
into the Vi
opened document, it pastes exactly what I copied from. Other than that, I use VIM
all day long.
Enjoy!
5
Try:set paste
â Patrick
Jan 18 '13 at 12:55
3
set pastetoggle=<F2> in .vimrc (vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste)
â Dave
Jan 18 '13 at 20:01
add a comment |Â
up vote
1
down vote
As previous answers have already mentioned, vi comes with just about every UNIX system out there.
I just wanted to add an example. Arch Linux is one particularly popular and lightweight distro which neither the Installer, or the base distro comes with vim by default, however both come with vi.
This is not an advantage for vi per se, because you can simply install vim manually, and there's little you need to accomplish in the installation that requires a text editor, and nothing where vim is superior to vi for the intended purpose. But understanding the difference and that vi is more ubiquitous and lightweight than vim does give it some niche advantages.
Also, just to be comprehensive, no one has yet metioned explicitly that vi is a direct precursor to vim. Vim was desinged specifically to be everything that vi was, and more.
So in a very direct way, vim is superior to vi, because it was designed to be.
add a comment |Â
up vote
1
down vote
The only reason ever to use vi over vim is when you have no other choice.
There's many, many reasons why vim stands for "vi improved"!
Borrowing from a related post I answered:-
- Multiple windows - horizontal, vertical & tabs.
- Visual highlighting.
- Online help via the :help command.
- Record macros into a register that you can then execute.
- Undo (and redo) multiple times, rather than old vi's insane undo
toggle. - Command line history, search history.
- An entire language embedded along with a host of available
functions, eg getcwd() - Vastly expanded pattern matching.
- Word completion via ctrl-P & ctrl-N.
- A built in file navigator (a little clunky, but can be useful).
- The ESC key actually quits commands you were trying to, well,
escape from instead of (insanely) running them as vi does. - Ability to run commands on all buffers, args or windows via bufdo,
argdo & windo.
You probably could have brought over the "many, many" reasons you mentioned in unix.stackexchange.com/a/425597/85039 answer over here. That'd make this answer a little better; otherwise it reads more like a comment than an actual answer
â Sergiy Kolodyazhnyy
Feb 21 at 6:12
Point taken. Answer updated, borrowing from a related answer I made yesterday.
â Paul T
Feb 23 at 0:31
add a comment |Â
up vote
1
down vote
This is exerpt from Vim Koans:
Master Wq and the Unix master
An old Unix master came to Master Wq. âÂÂI am troubled, Wq. You teach the way of Vim. vi is holy but Vim is not; its code sprawls, its features crowd memory; its binaries are vast, its behavior inconsistent. This is not the way of Unix. I fear you mislead your students. What can be done?âÂÂ
Master Wq nodded. âÂÂYou are right,â he said. âÂÂVim is broken. Let us fix it. Shall we begin?âÂÂ
The old Unix master agreed, and opened a shell. He typed:
$ vi vim.c
He began to code. Master Wq watched for a while and then asked him, âÂÂWhich implementation of vi are you using? Nvi? Vim? Elvis?âÂÂ
âÂÂI donâÂÂt know,â said the Unix master. âÂÂIt doesnâÂÂt matter.âÂÂ
Master Wq nodded. The Unix master sat stunned for a moment and closed his document unsaved.
add a comment |Â
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
56
down vote
accepted
vi
is (also) a POSIX standard editor. There are plenty of implementations and vim
is likely the most popular at least on Linux.
While many traditional Unix compliant OSes provide vi
implementations very close to the standard, vim
has added a lot of extra features that make it a double-edged sword.
Of course, these extensions are usually designed to ease the editing process and provide useful features and functionalities. However, once you are used to some of them (not the cosmetic ones like syntax coloring but those that change the editor's behavior) you can easily forget they are specific; and using a different implementation, including the ones based on the original BSD code can be very frustrating. The opposite is also true.
This is quite similar to the issue that happens with scripts using non POSIX bashisms faced to more orthodox shell implementations like dash
or ksh
.
add a comment |Â
up vote
56
down vote
accepted
vi
is (also) a POSIX standard editor. There are plenty of implementations and vim
is likely the most popular at least on Linux.
While many traditional Unix compliant OSes provide vi
implementations very close to the standard, vim
has added a lot of extra features that make it a double-edged sword.
Of course, these extensions are usually designed to ease the editing process and provide useful features and functionalities. However, once you are used to some of them (not the cosmetic ones like syntax coloring but those that change the editor's behavior) you can easily forget they are specific; and using a different implementation, including the ones based on the original BSD code can be very frustrating. The opposite is also true.
This is quite similar to the issue that happens with scripts using non POSIX bashisms faced to more orthodox shell implementations like dash
or ksh
.
add a comment |Â
up vote
56
down vote
accepted
up vote
56
down vote
accepted
vi
is (also) a POSIX standard editor. There are plenty of implementations and vim
is likely the most popular at least on Linux.
While many traditional Unix compliant OSes provide vi
implementations very close to the standard, vim
has added a lot of extra features that make it a double-edged sword.
Of course, these extensions are usually designed to ease the editing process and provide useful features and functionalities. However, once you are used to some of them (not the cosmetic ones like syntax coloring but those that change the editor's behavior) you can easily forget they are specific; and using a different implementation, including the ones based on the original BSD code can be very frustrating. The opposite is also true.
This is quite similar to the issue that happens with scripts using non POSIX bashisms faced to more orthodox shell implementations like dash
or ksh
.
vi
is (also) a POSIX standard editor. There are plenty of implementations and vim
is likely the most popular at least on Linux.
While many traditional Unix compliant OSes provide vi
implementations very close to the standard, vim
has added a lot of extra features that make it a double-edged sword.
Of course, these extensions are usually designed to ease the editing process and provide useful features and functionalities. However, once you are used to some of them (not the cosmetic ones like syntax coloring but those that change the editor's behavior) you can easily forget they are specific; and using a different implementation, including the ones based on the original BSD code can be very frustrating. The opposite is also true.
This is quite similar to the issue that happens with scripts using non POSIX bashisms faced to more orthodox shell implementations like dash
or ksh
.
edited Feb 21 at 6:36
Kusalananda
107k14209329
107k14209329
answered Jan 19 '13 at 2:48
jlliagre
45.2k578125
45.2k578125
add a comment |Â
add a comment |Â
up vote
27
down vote
No vi doesn't have any significant advantage over vim rather its the other way around.
Vim has more advantages then Vi.
You may be interested in : Why, oh WHY, do those #?@! nutheads use vi?
Edit also read : Is learning VIM worth the effort?
4
Yep. I don't use any IDE because the editors they force you to use just isn't Vim.
â Keith
Jan 12 '13 at 7:51
1
@Keith I use both Xcode and Eclipse and I'm still able to do editing with vi only.
â ott--
Jan 12 '13 at 9:39
@Keith SlickEdit has a great Vim emulation, and IDEA's is coming close to it. Also, Visual Studio has ViEmu.
â demonkoryu
Apr 23 '13 at 13:50
1
IntellIJ also has a nice vim plugin overriding the standard editor's behavior.
â JulienD
Aug 26 '15 at 6:59
add a comment |Â
up vote
27
down vote
No vi doesn't have any significant advantage over vim rather its the other way around.
Vim has more advantages then Vi.
You may be interested in : Why, oh WHY, do those #?@! nutheads use vi?
Edit also read : Is learning VIM worth the effort?
4
Yep. I don't use any IDE because the editors they force you to use just isn't Vim.
â Keith
Jan 12 '13 at 7:51
1
@Keith I use both Xcode and Eclipse and I'm still able to do editing with vi only.
â ott--
Jan 12 '13 at 9:39
@Keith SlickEdit has a great Vim emulation, and IDEA's is coming close to it. Also, Visual Studio has ViEmu.
â demonkoryu
Apr 23 '13 at 13:50
1
IntellIJ also has a nice vim plugin overriding the standard editor's behavior.
â JulienD
Aug 26 '15 at 6:59
add a comment |Â
up vote
27
down vote
up vote
27
down vote
No vi doesn't have any significant advantage over vim rather its the other way around.
Vim has more advantages then Vi.
You may be interested in : Why, oh WHY, do those #?@! nutheads use vi?
Edit also read : Is learning VIM worth the effort?
No vi doesn't have any significant advantage over vim rather its the other way around.
Vim has more advantages then Vi.
You may be interested in : Why, oh WHY, do those #?@! nutheads use vi?
Edit also read : Is learning VIM worth the effort?
edited May 23 '17 at 12:40
Communityâ¦
1
1
answered Jan 12 '13 at 6:59
abhixec
39127
39127
4
Yep. I don't use any IDE because the editors they force you to use just isn't Vim.
â Keith
Jan 12 '13 at 7:51
1
@Keith I use both Xcode and Eclipse and I'm still able to do editing with vi only.
â ott--
Jan 12 '13 at 9:39
@Keith SlickEdit has a great Vim emulation, and IDEA's is coming close to it. Also, Visual Studio has ViEmu.
â demonkoryu
Apr 23 '13 at 13:50
1
IntellIJ also has a nice vim plugin overriding the standard editor's behavior.
â JulienD
Aug 26 '15 at 6:59
add a comment |Â
4
Yep. I don't use any IDE because the editors they force you to use just isn't Vim.
â Keith
Jan 12 '13 at 7:51
1
@Keith I use both Xcode and Eclipse and I'm still able to do editing with vi only.
â ott--
Jan 12 '13 at 9:39
@Keith SlickEdit has a great Vim emulation, and IDEA's is coming close to it. Also, Visual Studio has ViEmu.
â demonkoryu
Apr 23 '13 at 13:50
1
IntellIJ also has a nice vim plugin overriding the standard editor's behavior.
â JulienD
Aug 26 '15 at 6:59
4
4
Yep. I don't use any IDE because the editors they force you to use just isn't Vim.
â Keith
Jan 12 '13 at 7:51
Yep. I don't use any IDE because the editors they force you to use just isn't Vim.
â Keith
Jan 12 '13 at 7:51
1
1
@Keith I use both Xcode and Eclipse and I'm still able to do editing with vi only.
â ott--
Jan 12 '13 at 9:39
@Keith I use both Xcode and Eclipse and I'm still able to do editing with vi only.
â ott--
Jan 12 '13 at 9:39
@Keith SlickEdit has a great Vim emulation, and IDEA's is coming close to it. Also, Visual Studio has ViEmu.
â demonkoryu
Apr 23 '13 at 13:50
@Keith SlickEdit has a great Vim emulation, and IDEA's is coming close to it. Also, Visual Studio has ViEmu.
â demonkoryu
Apr 23 '13 at 13:50
1
1
IntellIJ also has a nice vim plugin overriding the standard editor's behavior.
â JulienD
Aug 26 '15 at 6:59
IntellIJ also has a nice vim plugin overriding the standard editor's behavior.
â JulienD
Aug 26 '15 at 6:59
add a comment |Â
up vote
23
down vote
After spending a large fraction of my life (not including childhood) editing
comfortably with Vim, I spent about a month only using vi. In doing so, I
realized that I had been dependent on Vim for all of my text modification
needs. Before my trip with vi, whenever I had to substitute some text or
perform a similar operation in a large group of files, I would just open up the
files in Vim and run a :bufdo
command, and whenever I had to indent or format
some files, I would open them up in Vim and use Vim's =
and gw
commands. I
was Vim-dependent. After realizing vi did not have these commands, I was forced
to perform bulk text transformations with sed
and learned a great deal about
other programs such as awk
and indent
. Though I switched back to using Vim
in the end, the knowledge I gained by using a less featured editor was
substantial and has proved to be extremely useful. In addition to learning
about tools outside of a text editor, I also became better acquainted with vi.
Whenever I am working on a new system or a server that doesn't have Vim, I feel
much more comfortable using vi than I did before my month-long excursion.
Also, last month I installed Linux on a cheap WM8650 tablet and found there to
be a noticeable performance difference between Vim and vi, so I tend to use vi
on the tablet.
2
I find that this is a common issue in IT- the tools that help us can also obscure things we'd be better off learning.
â danstermeister
Dec 17 '15 at 17:11
Actually, handling in-place file editing on many files can't portably be done with Awk or Sed either. (The-i
switch on both is a GNU extension.) But you can use them portably with something likefor f in *; do printf '%sn' '%!sed -e '''some sed command'' x | ex "$f"; done
â Wildcard
Nov 10 '16 at 12:38
add a comment |Â
up vote
23
down vote
After spending a large fraction of my life (not including childhood) editing
comfortably with Vim, I spent about a month only using vi. In doing so, I
realized that I had been dependent on Vim for all of my text modification
needs. Before my trip with vi, whenever I had to substitute some text or
perform a similar operation in a large group of files, I would just open up the
files in Vim and run a :bufdo
command, and whenever I had to indent or format
some files, I would open them up in Vim and use Vim's =
and gw
commands. I
was Vim-dependent. After realizing vi did not have these commands, I was forced
to perform bulk text transformations with sed
and learned a great deal about
other programs such as awk
and indent
. Though I switched back to using Vim
in the end, the knowledge I gained by using a less featured editor was
substantial and has proved to be extremely useful. In addition to learning
about tools outside of a text editor, I also became better acquainted with vi.
Whenever I am working on a new system or a server that doesn't have Vim, I feel
much more comfortable using vi than I did before my month-long excursion.
Also, last month I installed Linux on a cheap WM8650 tablet and found there to
be a noticeable performance difference between Vim and vi, so I tend to use vi
on the tablet.
2
I find that this is a common issue in IT- the tools that help us can also obscure things we'd be better off learning.
â danstermeister
Dec 17 '15 at 17:11
Actually, handling in-place file editing on many files can't portably be done with Awk or Sed either. (The-i
switch on both is a GNU extension.) But you can use them portably with something likefor f in *; do printf '%sn' '%!sed -e '''some sed command'' x | ex "$f"; done
â Wildcard
Nov 10 '16 at 12:38
add a comment |Â
up vote
23
down vote
up vote
23
down vote
After spending a large fraction of my life (not including childhood) editing
comfortably with Vim, I spent about a month only using vi. In doing so, I
realized that I had been dependent on Vim for all of my text modification
needs. Before my trip with vi, whenever I had to substitute some text or
perform a similar operation in a large group of files, I would just open up the
files in Vim and run a :bufdo
command, and whenever I had to indent or format
some files, I would open them up in Vim and use Vim's =
and gw
commands. I
was Vim-dependent. After realizing vi did not have these commands, I was forced
to perform bulk text transformations with sed
and learned a great deal about
other programs such as awk
and indent
. Though I switched back to using Vim
in the end, the knowledge I gained by using a less featured editor was
substantial and has proved to be extremely useful. In addition to learning
about tools outside of a text editor, I also became better acquainted with vi.
Whenever I am working on a new system or a server that doesn't have Vim, I feel
much more comfortable using vi than I did before my month-long excursion.
Also, last month I installed Linux on a cheap WM8650 tablet and found there to
be a noticeable performance difference between Vim and vi, so I tend to use vi
on the tablet.
After spending a large fraction of my life (not including childhood) editing
comfortably with Vim, I spent about a month only using vi. In doing so, I
realized that I had been dependent on Vim for all of my text modification
needs. Before my trip with vi, whenever I had to substitute some text or
perform a similar operation in a large group of files, I would just open up the
files in Vim and run a :bufdo
command, and whenever I had to indent or format
some files, I would open them up in Vim and use Vim's =
and gw
commands. I
was Vim-dependent. After realizing vi did not have these commands, I was forced
to perform bulk text transformations with sed
and learned a great deal about
other programs such as awk
and indent
. Though I switched back to using Vim
in the end, the knowledge I gained by using a less featured editor was
substantial and has proved to be extremely useful. In addition to learning
about tools outside of a text editor, I also became better acquainted with vi.
Whenever I am working on a new system or a server that doesn't have Vim, I feel
much more comfortable using vi than I did before my month-long excursion.
Also, last month I installed Linux on a cheap WM8650 tablet and found there to
be a noticeable performance difference between Vim and vi, so I tend to use vi
on the tablet.
edited Jan 19 '13 at 2:01
answered Jan 12 '13 at 12:20
Smith John
19.1k76072
19.1k76072
2
I find that this is a common issue in IT- the tools that help us can also obscure things we'd be better off learning.
â danstermeister
Dec 17 '15 at 17:11
Actually, handling in-place file editing on many files can't portably be done with Awk or Sed either. (The-i
switch on both is a GNU extension.) But you can use them portably with something likefor f in *; do printf '%sn' '%!sed -e '''some sed command'' x | ex "$f"; done
â Wildcard
Nov 10 '16 at 12:38
add a comment |Â
2
I find that this is a common issue in IT- the tools that help us can also obscure things we'd be better off learning.
â danstermeister
Dec 17 '15 at 17:11
Actually, handling in-place file editing on many files can't portably be done with Awk or Sed either. (The-i
switch on both is a GNU extension.) But you can use them portably with something likefor f in *; do printf '%sn' '%!sed -e '''some sed command'' x | ex "$f"; done
â Wildcard
Nov 10 '16 at 12:38
2
2
I find that this is a common issue in IT- the tools that help us can also obscure things we'd be better off learning.
â danstermeister
Dec 17 '15 at 17:11
I find that this is a common issue in IT- the tools that help us can also obscure things we'd be better off learning.
â danstermeister
Dec 17 '15 at 17:11
Actually, handling in-place file editing on many files can't portably be done with Awk or Sed either. (The
-i
switch on both is a GNU extension.) But you can use them portably with something like for f in *; do printf '%sn' '%!sed -e '''some sed command'' x | ex "$f"; done
â Wildcard
Nov 10 '16 at 12:38
Actually, handling in-place file editing on many files can't portably be done with Awk or Sed either. (The
-i
switch on both is a GNU extension.) But you can use them portably with something like for f in *; do printf '%sn' '%!sed -e '''some sed command'' x | ex "$f"; done
â Wildcard
Nov 10 '16 at 12:38
add a comment |Â
up vote
11
down vote
I would have a hard time living without vim but I can't stand vi. However, learning the former will at least leave you with an idea of how to deal with the later when that's all that is available.
The vim interface by default is actually pretty close to vi. If I'm working on a system with vim the first thing I do is add this stuff to ~/.vimrc
:
syntax enable
set nocp
set wildmenu
There's a bunch of other stuff I prefer -- nowrap and numbering on, etc -- but never mind. "syntax enable" just turns on basic syntax highlighting (somewhat beefier: filetype plugin on
is fundamental too); "nocp" turns off vi compatibility and it is this that starts to distinguish vim from ye olde vi (eg, it enables showmode
which makes the whole experience somewhat more human, since you now have some clue about whether you are in command or ~INSERT~ mode). "wildmenu" just gives you a horizontal completion menu when doing some things, which makes life easier too.
The text editing facilities of vim are second to none -- other than emacs, I've never seen or heard of a piece of software that comes close. They are not easy to learn, but once you know them, they are much faster than mouse menus to use and much more dynamic than the simple key macro alternatives in mouse menu based interfaces. For programming, I sometimes use vim alongside an IDE like Eclipse, but I do most of the work in vim.
If you take that path, lol, look into the autocompletion and taglist plugins. And beware the dark side.
I always addset mouse=a
too.
â ott--
Jan 12 '13 at 16:36
Regarding your programming comment, you may find eclim interesting...
â ire_and_curses
Feb 4 '13 at 23:41
@ire_and_curses : haven't tried it. Eclipse and vim both monitor the source files and allow them to be updated externally, and flipping from one desktop to another is flipping from one desktop to another. Seems like quite the idea tho.
â goldilocks
Feb 5 '13 at 0:33
Although I don't think this answer should be the chosen answer (since it's biased), it's exactly the type of perspective that is helpful for understanding the differences. Thanks for taking a position.
â geneorama
Jul 19 '15 at 17:24
add a comment |Â
up vote
11
down vote
I would have a hard time living without vim but I can't stand vi. However, learning the former will at least leave you with an idea of how to deal with the later when that's all that is available.
The vim interface by default is actually pretty close to vi. If I'm working on a system with vim the first thing I do is add this stuff to ~/.vimrc
:
syntax enable
set nocp
set wildmenu
There's a bunch of other stuff I prefer -- nowrap and numbering on, etc -- but never mind. "syntax enable" just turns on basic syntax highlighting (somewhat beefier: filetype plugin on
is fundamental too); "nocp" turns off vi compatibility and it is this that starts to distinguish vim from ye olde vi (eg, it enables showmode
which makes the whole experience somewhat more human, since you now have some clue about whether you are in command or ~INSERT~ mode). "wildmenu" just gives you a horizontal completion menu when doing some things, which makes life easier too.
The text editing facilities of vim are second to none -- other than emacs, I've never seen or heard of a piece of software that comes close. They are not easy to learn, but once you know them, they are much faster than mouse menus to use and much more dynamic than the simple key macro alternatives in mouse menu based interfaces. For programming, I sometimes use vim alongside an IDE like Eclipse, but I do most of the work in vim.
If you take that path, lol, look into the autocompletion and taglist plugins. And beware the dark side.
I always addset mouse=a
too.
â ott--
Jan 12 '13 at 16:36
Regarding your programming comment, you may find eclim interesting...
â ire_and_curses
Feb 4 '13 at 23:41
@ire_and_curses : haven't tried it. Eclipse and vim both monitor the source files and allow them to be updated externally, and flipping from one desktop to another is flipping from one desktop to another. Seems like quite the idea tho.
â goldilocks
Feb 5 '13 at 0:33
Although I don't think this answer should be the chosen answer (since it's biased), it's exactly the type of perspective that is helpful for understanding the differences. Thanks for taking a position.
â geneorama
Jul 19 '15 at 17:24
add a comment |Â
up vote
11
down vote
up vote
11
down vote
I would have a hard time living without vim but I can't stand vi. However, learning the former will at least leave you with an idea of how to deal with the later when that's all that is available.
The vim interface by default is actually pretty close to vi. If I'm working on a system with vim the first thing I do is add this stuff to ~/.vimrc
:
syntax enable
set nocp
set wildmenu
There's a bunch of other stuff I prefer -- nowrap and numbering on, etc -- but never mind. "syntax enable" just turns on basic syntax highlighting (somewhat beefier: filetype plugin on
is fundamental too); "nocp" turns off vi compatibility and it is this that starts to distinguish vim from ye olde vi (eg, it enables showmode
which makes the whole experience somewhat more human, since you now have some clue about whether you are in command or ~INSERT~ mode). "wildmenu" just gives you a horizontal completion menu when doing some things, which makes life easier too.
The text editing facilities of vim are second to none -- other than emacs, I've never seen or heard of a piece of software that comes close. They are not easy to learn, but once you know them, they are much faster than mouse menus to use and much more dynamic than the simple key macro alternatives in mouse menu based interfaces. For programming, I sometimes use vim alongside an IDE like Eclipse, but I do most of the work in vim.
If you take that path, lol, look into the autocompletion and taglist plugins. And beware the dark side.
I would have a hard time living without vim but I can't stand vi. However, learning the former will at least leave you with an idea of how to deal with the later when that's all that is available.
The vim interface by default is actually pretty close to vi. If I'm working on a system with vim the first thing I do is add this stuff to ~/.vimrc
:
syntax enable
set nocp
set wildmenu
There's a bunch of other stuff I prefer -- nowrap and numbering on, etc -- but never mind. "syntax enable" just turns on basic syntax highlighting (somewhat beefier: filetype plugin on
is fundamental too); "nocp" turns off vi compatibility and it is this that starts to distinguish vim from ye olde vi (eg, it enables showmode
which makes the whole experience somewhat more human, since you now have some clue about whether you are in command or ~INSERT~ mode). "wildmenu" just gives you a horizontal completion menu when doing some things, which makes life easier too.
The text editing facilities of vim are second to none -- other than emacs, I've never seen or heard of a piece of software that comes close. They are not easy to learn, but once you know them, they are much faster than mouse menus to use and much more dynamic than the simple key macro alternatives in mouse menu based interfaces. For programming, I sometimes use vim alongside an IDE like Eclipse, but I do most of the work in vim.
If you take that path, lol, look into the autocompletion and taglist plugins. And beware the dark side.
answered Jan 12 '13 at 11:19
goldilocks
60k13140196
60k13140196
I always addset mouse=a
too.
â ott--
Jan 12 '13 at 16:36
Regarding your programming comment, you may find eclim interesting...
â ire_and_curses
Feb 4 '13 at 23:41
@ire_and_curses : haven't tried it. Eclipse and vim both monitor the source files and allow them to be updated externally, and flipping from one desktop to another is flipping from one desktop to another. Seems like quite the idea tho.
â goldilocks
Feb 5 '13 at 0:33
Although I don't think this answer should be the chosen answer (since it's biased), it's exactly the type of perspective that is helpful for understanding the differences. Thanks for taking a position.
â geneorama
Jul 19 '15 at 17:24
add a comment |Â
I always addset mouse=a
too.
â ott--
Jan 12 '13 at 16:36
Regarding your programming comment, you may find eclim interesting...
â ire_and_curses
Feb 4 '13 at 23:41
@ire_and_curses : haven't tried it. Eclipse and vim both monitor the source files and allow them to be updated externally, and flipping from one desktop to another is flipping from one desktop to another. Seems like quite the idea tho.
â goldilocks
Feb 5 '13 at 0:33
Although I don't think this answer should be the chosen answer (since it's biased), it's exactly the type of perspective that is helpful for understanding the differences. Thanks for taking a position.
â geneorama
Jul 19 '15 at 17:24
I always add
set mouse=a
too.â ott--
Jan 12 '13 at 16:36
I always add
set mouse=a
too.â ott--
Jan 12 '13 at 16:36
Regarding your programming comment, you may find eclim interesting...
â ire_and_curses
Feb 4 '13 at 23:41
Regarding your programming comment, you may find eclim interesting...
â ire_and_curses
Feb 4 '13 at 23:41
@ire_and_curses : haven't tried it. Eclipse and vim both monitor the source files and allow them to be updated externally, and flipping from one desktop to another is flipping from one desktop to another. Seems like quite the idea tho.
â goldilocks
Feb 5 '13 at 0:33
@ire_and_curses : haven't tried it. Eclipse and vim both monitor the source files and allow them to be updated externally, and flipping from one desktop to another is flipping from one desktop to another. Seems like quite the idea tho.
â goldilocks
Feb 5 '13 at 0:33
Although I don't think this answer should be the chosen answer (since it's biased), it's exactly the type of perspective that is helpful for understanding the differences. Thanks for taking a position.
â geneorama
Jul 19 '15 at 17:24
Although I don't think this answer should be the chosen answer (since it's biased), it's exactly the type of perspective that is helpful for understanding the differences. Thanks for taking a position.
â geneorama
Jul 19 '15 at 17:24
add a comment |Â
up vote
8
down vote
The advantage is that vi usually preinstalled in enterprise UNIX like AIX or Solaris. Besides vim is not accessible on installation media.
add a comment |Â
up vote
8
down vote
The advantage is that vi usually preinstalled in enterprise UNIX like AIX or Solaris. Besides vim is not accessible on installation media.
add a comment |Â
up vote
8
down vote
up vote
8
down vote
The advantage is that vi usually preinstalled in enterprise UNIX like AIX or Solaris. Besides vim is not accessible on installation media.
The advantage is that vi usually preinstalled in enterprise UNIX like AIX or Solaris. Besides vim is not accessible on installation media.
answered Jan 12 '13 at 8:56
dchirikov
2,8301915
2,8301915
add a comment |Â
add a comment |Â
up vote
1
down vote
I have noticed that I only choose Vi
over VIM
when I am copying and pasting a text document or config file that I have used cat
command. This is because when I try to ctrl-c
and then ctrl-v
into the VIM
opened document, it forces all lines to have a comment infront of them. So when I use Vi
to ctrl-v
or paste
into the Vi
opened document, it pastes exactly what I copied from. Other than that, I use VIM
all day long.
Enjoy!
5
Try:set paste
â Patrick
Jan 18 '13 at 12:55
3
set pastetoggle=<F2> in .vimrc (vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste)
â Dave
Jan 18 '13 at 20:01
add a comment |Â
up vote
1
down vote
I have noticed that I only choose Vi
over VIM
when I am copying and pasting a text document or config file that I have used cat
command. This is because when I try to ctrl-c
and then ctrl-v
into the VIM
opened document, it forces all lines to have a comment infront of them. So when I use Vi
to ctrl-v
or paste
into the Vi
opened document, it pastes exactly what I copied from. Other than that, I use VIM
all day long.
Enjoy!
5
Try:set paste
â Patrick
Jan 18 '13 at 12:55
3
set pastetoggle=<F2> in .vimrc (vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste)
â Dave
Jan 18 '13 at 20:01
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I have noticed that I only choose Vi
over VIM
when I am copying and pasting a text document or config file that I have used cat
command. This is because when I try to ctrl-c
and then ctrl-v
into the VIM
opened document, it forces all lines to have a comment infront of them. So when I use Vi
to ctrl-v
or paste
into the Vi
opened document, it pastes exactly what I copied from. Other than that, I use VIM
all day long.
Enjoy!
I have noticed that I only choose Vi
over VIM
when I am copying and pasting a text document or config file that I have used cat
command. This is because when I try to ctrl-c
and then ctrl-v
into the VIM
opened document, it forces all lines to have a comment infront of them. So when I use Vi
to ctrl-v
or paste
into the Vi
opened document, it pastes exactly what I copied from. Other than that, I use VIM
all day long.
Enjoy!
answered Jan 15 '13 at 20:51
Tony-Caffe
313
313
5
Try:set paste
â Patrick
Jan 18 '13 at 12:55
3
set pastetoggle=<F2> in .vimrc (vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste)
â Dave
Jan 18 '13 at 20:01
add a comment |Â
5
Try:set paste
â Patrick
Jan 18 '13 at 12:55
3
set pastetoggle=<F2> in .vimrc (vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste)
â Dave
Jan 18 '13 at 20:01
5
5
Try
:set paste
â Patrick
Jan 18 '13 at 12:55
Try
:set paste
â Patrick
Jan 18 '13 at 12:55
3
3
set pastetoggle=<F2> in .vimrc (vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste)
â Dave
Jan 18 '13 at 20:01
set pastetoggle=<F2> in .vimrc (vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste)
â Dave
Jan 18 '13 at 20:01
add a comment |Â
up vote
1
down vote
As previous answers have already mentioned, vi comes with just about every UNIX system out there.
I just wanted to add an example. Arch Linux is one particularly popular and lightweight distro which neither the Installer, or the base distro comes with vim by default, however both come with vi.
This is not an advantage for vi per se, because you can simply install vim manually, and there's little you need to accomplish in the installation that requires a text editor, and nothing where vim is superior to vi for the intended purpose. But understanding the difference and that vi is more ubiquitous and lightweight than vim does give it some niche advantages.
Also, just to be comprehensive, no one has yet metioned explicitly that vi is a direct precursor to vim. Vim was desinged specifically to be everything that vi was, and more.
So in a very direct way, vim is superior to vi, because it was designed to be.
add a comment |Â
up vote
1
down vote
As previous answers have already mentioned, vi comes with just about every UNIX system out there.
I just wanted to add an example. Arch Linux is one particularly popular and lightweight distro which neither the Installer, or the base distro comes with vim by default, however both come with vi.
This is not an advantage for vi per se, because you can simply install vim manually, and there's little you need to accomplish in the installation that requires a text editor, and nothing where vim is superior to vi for the intended purpose. But understanding the difference and that vi is more ubiquitous and lightweight than vim does give it some niche advantages.
Also, just to be comprehensive, no one has yet metioned explicitly that vi is a direct precursor to vim. Vim was desinged specifically to be everything that vi was, and more.
So in a very direct way, vim is superior to vi, because it was designed to be.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
As previous answers have already mentioned, vi comes with just about every UNIX system out there.
I just wanted to add an example. Arch Linux is one particularly popular and lightweight distro which neither the Installer, or the base distro comes with vim by default, however both come with vi.
This is not an advantage for vi per se, because you can simply install vim manually, and there's little you need to accomplish in the installation that requires a text editor, and nothing where vim is superior to vi for the intended purpose. But understanding the difference and that vi is more ubiquitous and lightweight than vim does give it some niche advantages.
Also, just to be comprehensive, no one has yet metioned explicitly that vi is a direct precursor to vim. Vim was desinged specifically to be everything that vi was, and more.
So in a very direct way, vim is superior to vi, because it was designed to be.
As previous answers have already mentioned, vi comes with just about every UNIX system out there.
I just wanted to add an example. Arch Linux is one particularly popular and lightweight distro which neither the Installer, or the base distro comes with vim by default, however both come with vi.
This is not an advantage for vi per se, because you can simply install vim manually, and there's little you need to accomplish in the installation that requires a text editor, and nothing where vim is superior to vi for the intended purpose. But understanding the difference and that vi is more ubiquitous and lightweight than vim does give it some niche advantages.
Also, just to be comprehensive, no one has yet metioned explicitly that vi is a direct precursor to vim. Vim was desinged specifically to be everything that vi was, and more.
So in a very direct way, vim is superior to vi, because it was designed to be.
answered Mar 27 '17 at 23:41
StatGenGeek
112
112
add a comment |Â
add a comment |Â
up vote
1
down vote
The only reason ever to use vi over vim is when you have no other choice.
There's many, many reasons why vim stands for "vi improved"!
Borrowing from a related post I answered:-
- Multiple windows - horizontal, vertical & tabs.
- Visual highlighting.
- Online help via the :help command.
- Record macros into a register that you can then execute.
- Undo (and redo) multiple times, rather than old vi's insane undo
toggle. - Command line history, search history.
- An entire language embedded along with a host of available
functions, eg getcwd() - Vastly expanded pattern matching.
- Word completion via ctrl-P & ctrl-N.
- A built in file navigator (a little clunky, but can be useful).
- The ESC key actually quits commands you were trying to, well,
escape from instead of (insanely) running them as vi does. - Ability to run commands on all buffers, args or windows via bufdo,
argdo & windo.
You probably could have brought over the "many, many" reasons you mentioned in unix.stackexchange.com/a/425597/85039 answer over here. That'd make this answer a little better; otherwise it reads more like a comment than an actual answer
â Sergiy Kolodyazhnyy
Feb 21 at 6:12
Point taken. Answer updated, borrowing from a related answer I made yesterday.
â Paul T
Feb 23 at 0:31
add a comment |Â
up vote
1
down vote
The only reason ever to use vi over vim is when you have no other choice.
There's many, many reasons why vim stands for "vi improved"!
Borrowing from a related post I answered:-
- Multiple windows - horizontal, vertical & tabs.
- Visual highlighting.
- Online help via the :help command.
- Record macros into a register that you can then execute.
- Undo (and redo) multiple times, rather than old vi's insane undo
toggle. - Command line history, search history.
- An entire language embedded along with a host of available
functions, eg getcwd() - Vastly expanded pattern matching.
- Word completion via ctrl-P & ctrl-N.
- A built in file navigator (a little clunky, but can be useful).
- The ESC key actually quits commands you were trying to, well,
escape from instead of (insanely) running them as vi does. - Ability to run commands on all buffers, args or windows via bufdo,
argdo & windo.
You probably could have brought over the "many, many" reasons you mentioned in unix.stackexchange.com/a/425597/85039 answer over here. That'd make this answer a little better; otherwise it reads more like a comment than an actual answer
â Sergiy Kolodyazhnyy
Feb 21 at 6:12
Point taken. Answer updated, borrowing from a related answer I made yesterday.
â Paul T
Feb 23 at 0:31
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The only reason ever to use vi over vim is when you have no other choice.
There's many, many reasons why vim stands for "vi improved"!
Borrowing from a related post I answered:-
- Multiple windows - horizontal, vertical & tabs.
- Visual highlighting.
- Online help via the :help command.
- Record macros into a register that you can then execute.
- Undo (and redo) multiple times, rather than old vi's insane undo
toggle. - Command line history, search history.
- An entire language embedded along with a host of available
functions, eg getcwd() - Vastly expanded pattern matching.
- Word completion via ctrl-P & ctrl-N.
- A built in file navigator (a little clunky, but can be useful).
- The ESC key actually quits commands you were trying to, well,
escape from instead of (insanely) running them as vi does. - Ability to run commands on all buffers, args or windows via bufdo,
argdo & windo.
The only reason ever to use vi over vim is when you have no other choice.
There's many, many reasons why vim stands for "vi improved"!
Borrowing from a related post I answered:-
- Multiple windows - horizontal, vertical & tabs.
- Visual highlighting.
- Online help via the :help command.
- Record macros into a register that you can then execute.
- Undo (and redo) multiple times, rather than old vi's insane undo
toggle. - Command line history, search history.
- An entire language embedded along with a host of available
functions, eg getcwd() - Vastly expanded pattern matching.
- Word completion via ctrl-P & ctrl-N.
- A built in file navigator (a little clunky, but can be useful).
- The ESC key actually quits commands you were trying to, well,
escape from instead of (insanely) running them as vi does. - Ability to run commands on all buffers, args or windows via bufdo,
argdo & windo.
edited Feb 23 at 0:34
answered Feb 21 at 6:07
Paul T
16114
16114
You probably could have brought over the "many, many" reasons you mentioned in unix.stackexchange.com/a/425597/85039 answer over here. That'd make this answer a little better; otherwise it reads more like a comment than an actual answer
â Sergiy Kolodyazhnyy
Feb 21 at 6:12
Point taken. Answer updated, borrowing from a related answer I made yesterday.
â Paul T
Feb 23 at 0:31
add a comment |Â
You probably could have brought over the "many, many" reasons you mentioned in unix.stackexchange.com/a/425597/85039 answer over here. That'd make this answer a little better; otherwise it reads more like a comment than an actual answer
â Sergiy Kolodyazhnyy
Feb 21 at 6:12
Point taken. Answer updated, borrowing from a related answer I made yesterday.
â Paul T
Feb 23 at 0:31
You probably could have brought over the "many, many" reasons you mentioned in unix.stackexchange.com/a/425597/85039 answer over here. That'd make this answer a little better; otherwise it reads more like a comment than an actual answer
â Sergiy Kolodyazhnyy
Feb 21 at 6:12
You probably could have brought over the "many, many" reasons you mentioned in unix.stackexchange.com/a/425597/85039 answer over here. That'd make this answer a little better; otherwise it reads more like a comment than an actual answer
â Sergiy Kolodyazhnyy
Feb 21 at 6:12
Point taken. Answer updated, borrowing from a related answer I made yesterday.
â Paul T
Feb 23 at 0:31
Point taken. Answer updated, borrowing from a related answer I made yesterday.
â Paul T
Feb 23 at 0:31
add a comment |Â
up vote
1
down vote
This is exerpt from Vim Koans:
Master Wq and the Unix master
An old Unix master came to Master Wq. âÂÂI am troubled, Wq. You teach the way of Vim. vi is holy but Vim is not; its code sprawls, its features crowd memory; its binaries are vast, its behavior inconsistent. This is not the way of Unix. I fear you mislead your students. What can be done?âÂÂ
Master Wq nodded. âÂÂYou are right,â he said. âÂÂVim is broken. Let us fix it. Shall we begin?âÂÂ
The old Unix master agreed, and opened a shell. He typed:
$ vi vim.c
He began to code. Master Wq watched for a while and then asked him, âÂÂWhich implementation of vi are you using? Nvi? Vim? Elvis?âÂÂ
âÂÂI donâÂÂt know,â said the Unix master. âÂÂIt doesnâÂÂt matter.âÂÂ
Master Wq nodded. The Unix master sat stunned for a moment and closed his document unsaved.
add a comment |Â
up vote
1
down vote
This is exerpt from Vim Koans:
Master Wq and the Unix master
An old Unix master came to Master Wq. âÂÂI am troubled, Wq. You teach the way of Vim. vi is holy but Vim is not; its code sprawls, its features crowd memory; its binaries are vast, its behavior inconsistent. This is not the way of Unix. I fear you mislead your students. What can be done?âÂÂ
Master Wq nodded. âÂÂYou are right,â he said. âÂÂVim is broken. Let us fix it. Shall we begin?âÂÂ
The old Unix master agreed, and opened a shell. He typed:
$ vi vim.c
He began to code. Master Wq watched for a while and then asked him, âÂÂWhich implementation of vi are you using? Nvi? Vim? Elvis?âÂÂ
âÂÂI donâÂÂt know,â said the Unix master. âÂÂIt doesnâÂÂt matter.âÂÂ
Master Wq nodded. The Unix master sat stunned for a moment and closed his document unsaved.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
This is exerpt from Vim Koans:
Master Wq and the Unix master
An old Unix master came to Master Wq. âÂÂI am troubled, Wq. You teach the way of Vim. vi is holy but Vim is not; its code sprawls, its features crowd memory; its binaries are vast, its behavior inconsistent. This is not the way of Unix. I fear you mislead your students. What can be done?âÂÂ
Master Wq nodded. âÂÂYou are right,â he said. âÂÂVim is broken. Let us fix it. Shall we begin?âÂÂ
The old Unix master agreed, and opened a shell. He typed:
$ vi vim.c
He began to code. Master Wq watched for a while and then asked him, âÂÂWhich implementation of vi are you using? Nvi? Vim? Elvis?âÂÂ
âÂÂI donâÂÂt know,â said the Unix master. âÂÂIt doesnâÂÂt matter.âÂÂ
Master Wq nodded. The Unix master sat stunned for a moment and closed his document unsaved.
This is exerpt from Vim Koans:
Master Wq and the Unix master
An old Unix master came to Master Wq. âÂÂI am troubled, Wq. You teach the way of Vim. vi is holy but Vim is not; its code sprawls, its features crowd memory; its binaries are vast, its behavior inconsistent. This is not the way of Unix. I fear you mislead your students. What can be done?âÂÂ
Master Wq nodded. âÂÂYou are right,â he said. âÂÂVim is broken. Let us fix it. Shall we begin?âÂÂ
The old Unix master agreed, and opened a shell. He typed:
$ vi vim.c
He began to code. Master Wq watched for a while and then asked him, âÂÂWhich implementation of vi are you using? Nvi? Vim? Elvis?âÂÂ
âÂÂI donâÂÂt know,â said the Unix master. âÂÂIt doesnâÂÂt matter.âÂÂ
Master Wq nodded. The Unix master sat stunned for a moment and closed his document unsaved.
answered Aug 28 at 18:53
modlin
234
234
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f61021%2fvi-vs-vim-or-is-there-any-reason-why-i-would-ever-want-to-use-vi%23new-answer', 'question_page');
);
Post as a guest
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
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
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
21
The nice thing about
vi
is you can expect it to be on every POSIX compliant system.â jordanm
Jan 12 '13 at 7:06
1
Actually, Ubuntu standard installation includes
vi
and notvim
.. Ubuntu is one of the most user friendly distro btw ;-)â amyassin
Jan 16 '13 at 19:53
9
@amyassin This is incorrect, Ubuntu, like most Linux distributions,includes
vim
.vi
is just a symbolic link that eventually point tovim
in the default installation.â jlliagre
Aug 30 '15 at 0:21
Not quite sure but I think vim is heavier. This caracteristic is important on light platforms (e.g. raspberry pi)
â Manu H
Sep 12 '15 at 7:38
My advice is: Use Vim, but learn
vi
using the POSIX specifications forvi
. That way you have portable knowledge as well as knowing Vim extensions.â Wildcard
Jan 25 '16 at 11:51