Author Topic: VI: what\'s the big deal?  (Read 9707 times)

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
VI: what\'s the big deal?
« Reply #15 on: June 14, 2004, 09:18:26 am »
vi has a small foot print and is ubiquitous ... due to its age, it also has some history.
Sure, you can get small emacs (ue), and others... but vi has history and is ubiquitous.

I don\'t like it, but I can usually change an IP or so with it.  I\'d certainly rather have vi
than ed, etc.

Scott
ps: emacs on the Z is painful... but I\'m glad to have it.

raybert

  • Full Member
  • ***
  • Posts: 233
    • View Profile
VI: what\'s the big deal?
« Reply #16 on: June 15, 2004, 11:14:33 am »
A little vi history: Bill Joy (formerly of Sun) is largely credited for writing the initial versions of vi while at Berkley.  Here\'s an interesting interview with him from 1984 where he discusses the origins of vi and, for those with the stamina to read the whole thing, a few more interesting insights from the land of 1984:

    http://www.cs.pdx.edu/~kirkenda/joy84.html

For my part, I resisted learning vi for a long time.  There is an enhanced version of vi (somewhat like vim) called vile and for the longest time I could be heard saying that \"vile\" was in fact the BEST name for vi.

The long and the short of it is ubiquitousness.  If you work only on GUIs, you have no need for any version of vi.  If you work on terminal-based unix systems, vi is a must.  It\'s the only editor that you can be virtually certain will be available on any system you visit.  So if you\'re in that business, you will eventually be forced to succumb to vi.  You have been warned...  

~ray

datajerk

  • Full Member
  • ***
  • Posts: 219
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #17 on: June 15, 2004, 11:35:49 am »
vi rocks for the following reasons:

1.  Ubiquitous.  All UNIX and Linux platforms have it.
2.  Can be small and self contained.  (unlike emacs).
3.  Optimal for reduced key keyboards.  vi only needs ctrl, shift, and esc keys.  Years ago arrows did nothing.  This is a big plus for me.  I never have to have my hands stray to another part of the keyboard or grab the mouse (or worse--the stylus).  F1-F12, don\'t need them.
4.  Robust pattern matching.
5.  vi has a great GUI called xterm.  You should try it.

vi is not a word processor, just a simple text editor.

If you work with UNIX/Linux you cannot avoid it.  Someday you will be in an environment out of your control with vi as the only editor available.

Anonymous

  • Guest
VI: what\'s the big deal?
« Reply #18 on: June 15, 2004, 11:45:54 am »
I guess what most of you vi & vim bashers is missing is that vi is a _text editor_ and not a word processor. It allows you to quickly cut, copy and paste text (for instance) all without a mouse or having to use the arrow keys in place of the mouse. For example, if I have the sentence:

The quick brown fox jumps over the lazy dog.

with the cursor over the capital \"T\", I can:

delete the whole line in two keystrokes: dd  (delete twice)
copy the whole line with one keystroke: Y (yank the whole line)
copy the word \"The\"  with three keystrokes: y3l (yank three characters to the right)
copy the sentence to the first \'j\' in three keystrokes: ytj (yank \'til j)
move the cursor to the end of the line in one keystroke: $
begin to append text to the end of the line in one keystroke: A
move this line after the line below it in three keystrokes: ddp (delete line and paste)
undo the delete & paste in two keystrokes: uu (undo twice)
make the \"T\" lowercase in one keystroke: ~ (change case)
Change the word \"The\" to \"Any\" in six keystrokes: cwAny<esc> (change the word to \"A\", escape)

Anyone can learn these keystrokes, because they are all based on mnemonics (like \"d\" for delete) with some experience and patience. Does everyone need to do this sort of thing? No. Who _does_ need to do this kind of thing? Mostly people who work with tons of text files: programmers, system admins and the like.

Do word processors allow you to do the same sorts of things? Of course, but not as efficiently because mostly they use selection rectangles, etc. with a mouse or arrow keys. So, yes, pico can let you do some of this stuff, but not with as much economy of keystrokes.

_That\'s_ why people like vi: fewer keypresses (which is painfully obvious when you\'re telnetted into a slow machine over a slow network connection).

padishah_emperor

  • Hero Member
  • *****
  • Posts: 849
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #19 on: June 15, 2004, 11:54:03 am »
I\'ve used vi for so long I can\'t remember.  But it\'s easy to use compared to the others I had to use in the ye olde days of computing. I only know a few commands but that does me fine..

dd Delete line
A Append
:w Write file
:q Quit

That\'s all I\'ll ever need for quick editing of /etc/fstab or /etc/hosts etc...

But my favorite editor is mc (Midnight Commander) which does a good job at editing, esp in Xterm under X on my Z ;-)

As datajerk says, it\'s common across all UNIX families so therefore is good.
Left Linux and Linux PDAs... sorry, got boring.  Switched to Mac.

Anonymous

  • Guest
VI: what\'s the big deal?
« Reply #20 on: June 15, 2004, 12:23:14 pm »
how do you wrap up a long line into a little nice paragraph in vi on z? on my other linux box, i would do :%!fmt

pmf

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
VI: what\'s the big deal?
« Reply #21 on: June 15, 2004, 12:53:37 pm »
Quote
how do you wrap up a long line into a little nice paragraph in vi on z? on my other linux box, i would do :%!fmt


gqq - format current line

Or mark several lines with v and then do gq

clivel

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • http://www.bundu.com
VI: what\'s the big deal?
« Reply #22 on: June 15, 2004, 05:38:41 pm »
I used to think that Vi was the best thing since sliced bread, I had been working on CP/M systems (remember it) using a line editor. When I first moved to Unix, I discovered Vi, and I fell in love.
 A few years later, a change of job, and I found myself working on DOS systems. I managed to convince my boss to buy me a Vi clone for DOS, the damn thing was so unreliable, it kept on crashing and I was loosing work. My boss insisted that I switch to his favourite editor, \"Brief\" from \"Underware Solutions\", initially I resisted, but after a little bit of perseverance, I soon realised that Brief was and is still one of the best text editors ever developed. Even though I was a pretty accomplished Vi user, having used it all day every day for a few years, I was amazed it just how much slicker Brief was. Eventually Borland bought Brief, and let it die. I have never used a Borland produce since in protest (not that I think that Borland has noticed).
Roll forward a few years, Windows everywhere, high resolution screens, Brief in an 80x24 Dos box was getting a bit antiquated. Another job, and my Manager provided me with Codewright for windows.  It does the job, and I have continued to use it over the years. but somehow it has never seemed to really inspire me.
Then I discovered Linux, looking for a text editor, I thought it would be great to return to my first love, Vi. Browsing the web, it appeared that VIM was one of the best implementations, and best of all, I could use it on both Windows and Linux. After a month of struggling I eventually gave up. Vi was great in it\'s time, but the world has passed it by. It is powerful, reliable, but a pig to use. I believe that everyone working on Unix/Linux should know a few Vi commands, it is on every system, and often the only way to get at the config files.
However, I can only assume that the current diehard Vi users have not looked at any alternatives other than perhaps Emacs.
Regards,
Clive

panyo

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #23 on: June 15, 2004, 06:24:24 pm »
How do you set the delete key to work instead of sending ^? in vi on the SL5500? And while I am asking, I am not aware of emacs on the SL5500 with OZ.  Microemacs is available, however. But how do I go to the menues? How do I get to the menues on ordinary emacs in non GUI mode for that matter?
SL5500  OZ3.5.2 (Opie), Dvorak built in keyboard
Spectrum24 Ethernet
SanDisk 256 ext2 (AR0401RF China) SD
Lexar 256 VFAT (P/N 2260, Rev. A), Transcend 128 ext2 CF
Pismo, Cube, 8600, Gentoo PowerPC, YellowDog

Anonymous

  • Guest
VI: what\'s the big deal?
« Reply #24 on: June 15, 2004, 07:34:36 pm »
Quote
I used to think that Vi was the best thing since sliced bread,

It still is. And Vim is even better.

Quote
Roll forward a few years, Windows everywhere, high resolution screens, Brief in an 80x24 Dos box was getting a bit antiquated.


I\'m typing this in an 80x50 GVim window (invoked from a ZUG forum posting form text area in Mozilla/FireFox with Mozex) on a 1280x1024 X \"desktop\". It doesn\'t seem antiquated to me in the least.

Quote
Then I discovered Linux, looking for a text editor, I thought it would be great to return to my first love, Vi. Browsing the web, it appeared that VIM was one of the best implementations, and best of all, I could use it on both Windows and Linux. After a month of struggling I eventually gave up.


You chose to give up.

Quote
Vi was great in it\'s time, but the world has passed it by. It is powerful, reliable, but a pig to use.


Please reread some of the other posts in this thread which eloquently describe the power of Vi/Vim. Although you may not find Vi/Vim to be useful, many of us do.

Quote
However, I can only assume that the current diehard Vi users have not looked at any alternatives other than perhaps Emacs.


In my opinion no editor comes close to Vim. I don\'t want to use anything else.  And, yes, I have tried other editors...

Anonymous

  • Guest
VI: what\'s the big deal?
« Reply #25 on: June 15, 2004, 09:15:13 pm »
To each their own.
I\'ve gone through a lot of editors and eventually settled on emacs, which I\'ve been using for years
(xemacs believe it or not - you can get round the speed issues with gnuclient). Then I wanted a
good editor for the zaurus but didn\'t like the emacs clones that are out there. I gave vim a serious try
for the first time (I\'ve fallen off that learning curve many times in the past) and now I\'m using vim
everywhere. The more I learn to use it the nicer I find it.
My advice would be to try out what out there and settle with whatever grabs you. Vim has a steep learning curve to get to where it\'s efficient and this may not be worth it if you don\'t do much editing.

Tehas

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • http://users.adelphia.net/~stonerrl/rick/
VI: what\'s the big deal?
« Reply #26 on: June 15, 2004, 10:05:27 pm »
Just today, a friend sent me a link to this...  vi for Windows.

http://www.winvi.de/en/
+SL-5600 v1.32 ROM (Special pre-emptive kernel with overclock)  +Viking 256CF  +SimpleTech 256CF  +Viking 128SD (as ext2)  +AmbiCom WL1100C +Micro Innovations KB  +Hawking Ethernet CF  
+SL6000L +Lexar 1GB SD (as ext2)  +Windows 98/Me/Nt/XP  +Mandrake 8.1 My Zaurus Page[img]http://users.adelphia.net/~stonerrl/rick/rls_userbar.gif\" border=\"0\" class=\"linked-sig-image\" /]

nevarrie

  • Full Member
  • ***
  • Posts: 188
    • View Profile
    • http://www.thegrantclan.org
VI: what\'s the big deal?
« Reply #27 on: June 15, 2004, 11:33:38 pm »
Quote
However, I can only assume that the current diehard Vi users have not looked at any alternatives other than perhaps Emacs.


Any recommendtions on other editors to try...I find I am alway willing to try new editors...so far I have always come back to vim but I know there are always new programs out there and old ones that I have never tried before...I would love to see what other recommend as alternives that work as well as Vim...
***********************
Jeremy "Nevarrie" Grant
SL-6000L
OpenZaurus 3.5.4.1 GPE(2.6 kernel)|GrantRom 0.01(e-image clone)
Targus IR Keyborad

padishah_emperor

  • Hero Member
  • *****
  • Posts: 849
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #28 on: June 16, 2004, 10:14:47 am »
Vi vs. Emacs?
Flame Wars: Episode IV?

Personally, I become ill at the thought of Emacs, I know it\'s supposed to be good, but I could never get to grips with it.  I\'ve never looked at many other alternatives, I just can\'t be bothered to learn new editors when I know enough vi to get on with. Vi rules ;-) so does mc\'s editor..
Left Linux and Linux PDAs... sorry, got boring.  Switched to Mac.

lucho

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
    • http://
VI: what\'s the big deal?
« Reply #29 on: June 16, 2004, 10:28:22 am »
The biggest advantage of vi is that it is available on _any_ Unix box. I don\'t see any reason to use or learn vim -- it is highly customizable and very flexible, and that is its biggest disadvantage -- if you sit on computer that doesn\'t have your configuration you are lost.

I don\'t use vi as my primary editor (I use jed), but I know it well enough and use it on boxes that I don\'t login often. Amazingly, my fingers know what editor to type (vi, jed or acme) depending on the box I use

As for which editor is best everybody knows it\'s ed -- ed is the standard editor.