OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
> VI: what's the big deal?
ScottYelich
post Jun 14 2004, 05:18 AM
Post #16





Group: Members
Posts: 992
Joined: 9-October 03
From: NYC
Member No.: 609



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.
Go to the top of the page
 
+Quote Post
raybert
post Jun 15 2004, 07:14 AM
Post #17





Group: Members
Posts: 233
Joined: 2-December 03
From: Boston, MA
Member No.: 1,029



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. wink.gif

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... wink.gif

~ray
Go to the top of the page
 
+Quote Post
datajerk
post Jun 15 2004, 07:35 AM
Post #18





Group: Members
Posts: 219
Joined: 14-February 04
Member No.: 1,861



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.
Go to the top of the page
 
+Quote Post
post Jun 15 2004, 07:45 AM
Post #19





Group:
Posts: 0
Joined: --
Member No.: 0



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).
Go to the top of the page
 
+Quote Post
padishah_emperor
post Jun 15 2004, 07:54 AM
Post #20





Group: Members
Posts: 849
Joined: 6-March 04
Member No.: 2,180



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.
Go to the top of the page
 
+Quote Post
post Jun 15 2004, 08:23 AM
Post #21





Group:
Posts: 0
Joined: --
Member No.: 0



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
Go to the top of the page
 
+Quote Post
pmf
post Jun 15 2004, 08:53 AM
Post #22





Group: Members
Posts: 64
Joined: 18-March 04
Member No.: 2,392



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
Go to the top of the page
 
+Quote Post
clivel
post Jun 15 2004, 01:38 PM
Post #23





Group: Members
Posts: 84
Joined: 3-October 03
From: Vancouver, BC
Member No.: 560



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
Go to the top of the page
 
+Quote Post
panyo
post Jun 15 2004, 02:24 PM
Post #24





Group: Members
Posts: 88
Joined: 3-February 04
Member No.: 1,688



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?
Go to the top of the page
 
+Quote Post
post Jun 15 2004, 03:34 PM
Post #25





Group:
Posts: 0
Joined: --
Member No.: 0



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...
Go to the top of the page
 
+Quote Post
post Jun 15 2004, 05:15 PM
Post #26





Group:
Posts: 0
Joined: --
Member No.: 0



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.
Go to the top of the page
 
+Quote Post
Tehas
post Jun 15 2004, 06:05 PM
Post #27





Group: Members
Posts: 157
Joined: 6-November 03
From: Harrisburg PA
Member No.: 867



Just today, a friend sent me a link to this... vi for Windows.

http://www.winvi.de/en/
Go to the top of the page
 
+Quote Post
nevarrie
post Jun 15 2004, 07:33 PM
Post #28





Group: Members
Posts: 189
Joined: 9-December 03
From: Kansas City Kansas
Member No.: 1,112



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...
Go to the top of the page
 
+Quote Post
padishah_emperor
post Jun 16 2004, 06:14 AM
Post #29





Group: Members
Posts: 849
Joined: 6-March 04
Member No.: 2,180



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..
Go to the top of the page
 
+Quote Post
lucho
post Jun 16 2004, 06:28 AM
Post #30





Group: Members
Posts: 57
Joined: 29-May 03
From: USA
Member No.: 61



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 smile.gif

As for which editor is best everybody knows it's ed -- ed is the standard editor. wink.gif
Go to the top of the page
 
+Quote Post

3 Pages V  < 1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th July 2014 - 10:41 PM