PDA

View Full Version : Vi or Emacs?


Skunk
15-04-2001, 21:56
I've been using Vi quite a bit, and I'm getting the hang of some of the basic commands etc. I tried Emacs and it didn't click with me at all - probably because there's so much to it. Vi seems easier to use for basic editing, whlie still being able to do virtually anything once you know the commands. Emacs was just confusing...

Jock203
15-04-2001, 22:29
Would you mind explaining what Vi and Emac is for us newbies plz :D

Thanks.

ybw
16-04-2001, 00:19
They are both ASCII editors. Vi is nice and small, whereas emacs is more chunky :)

I started off using emacs because I went to edit a file using vi and nothing worked, so I ran away...
But I DL'd a vi guide(and bought a linux book) and now I'm 100% vi apart from when in X, I use nedit.

Andy

Ferg
16-04-2001, 10:20
i used to use pico.... now i use vi :)

Uranium
16-04-2001, 10:40
Pffft @ Linux

Skunk
16-04-2001, 13:48
Emacs is more than an editor - it's fully extendable (with a programming language called Lisp) and can do everything from editing text files to reading your e-mail, browsing the web and all other kinds of stuff. It was written (and is now maintained) by Richard Stallman who founded the GNU project and is essentially the founding father of the Open Source movement.

Vi is a pure command line text editor and has an insanely complex array of commands, allowing you to do virtually anything to a text document without having to mess around in a cluttered interface.

Deathwish2000
16-04-2001, 22:33
pico :)

Gwil Da Skank Of TA
17-04-2001, 00:30
shaddup dw2k :P

VI is the only realistic option for when things go badly wrong i find - emacs is nice, but takes more getting used to to really realise its potential - for the moment though -

vi / vim

:)

Godin
17-04-2001, 01:46
/me puts up his VI campaign banner and starts handing out the "I use VI" badges.

Wazzoo
17-04-2001, 03:00
pico :)

[Ostrich]
17-04-2001, 13:28
I HATE VI!

But that's purely cos when I was at college I had to do about 8 COBOL programs... in Vi! ;(

It's not nice <SHIFT + i>column 5 line 1 bah blah blah <SHIFT + :> wq!

BOLLOCKS!

:)

gring00
22-04-2001, 07:39
I personally prefer vi (or vim when I can remember that extra character). I toyed with emacs but you can't teach an old dog new tricks as they say. I was converted to vim when I had to open a large one line file and vi just balked at the task.
Emacs is written in Lisp? Crikey!
Open that file, err: No.
<slaps head>
Never did like lisp.
Stallman I think would prefer to be known as the person who founded the Free Software movement as opposed to the Open Source movement. A seemingly minor point, but one which he goes to great lengths to make.

:)

schmoely
25-04-2001, 00:32
Hi guys,

Just found this forum. Nice.

vi and emacs are two VERY different tools and are both in their own right VERY useful for doing different things...

emacs is memory-hungry. It eats HD space, it eats memory, and probably isn't too ideal for 100 thin-clients telnet'd into a central server. In fact, drop the "probably" out of that sentence - it's not ideal at all.

If you're running your own Linux box and you're doing your own stuff locally, emacs would be my choice. And if you're not familiar with it, just use vi emulation (couple of drawbacks in that - there's NO such thing as a pure vi emulator) so that you can learn both. Everything I've ever read on the newsgroups suggests you do this, so I did.

emacs also offers the user the ability to expand/customise ad infinitum.

vi (or vim, for that matter) is small, it's fast, and it doesn't eat megs of memory. Ideal for 100 thin-clients using telnet remotely. And if you're urgently trying to hack up a perl script over a 33.6k modem connection from abroad, it's the tool you're looking for. That's about all I can say for vi. I don't know the real differences between vi and vim to discuss this.

By far and away the nicest thing about emacs is that I can take all the WRONGLY (!!!) bracketed code like so:

for (i = 0; i < 10; i++)
{
/* do stuff with horrible braces */
}

And turn it into:
for (i = 0; i < 10; i++) {
/* do stuff with lurvely braces */
}


BUT LET ME JUST SAY ONE LAST THING BEFORE YOU HIT REPLY AND FLAME ME!!!

We're going into REALLY rocky territory here. It depends ENTIRELY on who you are. There's no such thing as "vi is better than emacs", or vice versa, and if you learn how to use both you'll realise why.

Also, this is just MY opinion. I like braces like that, some people thing stuff becomes unreadable like that. It's personal preference. I was just demonstrating what emacs can do for you. I had the privilege of using that functionality only 10 minutes ago on my Linux box!

Look forward to reading some more posts in the forum :)

BYEEEE
J

Skunk
25-04-2001, 10:53
Does emacs convert braces the other way?

/me hugs his lovely easy to understand brace syntax

schmoely
25-04-2001, 11:19
Mais oui...

...But you have to be evil to want to do that :)

aef
25-04-2001, 16:28
Originally posted by schmoel

By far and away the nicest thing about emacs is that I can take all the WRONGLY (!!!) bracketed code like so:


*slap*

You clearly haven't seen the light :/

AEF

Jiveman
25-04-2001, 20:21
As a linux newbie I found Emacs easy to use when I loaded it up, I haven't tried Vi yet but I have used pica.

The only thing I have tried and failed to do so far is create a new document (which I understand as a "buffer") but I am sure I could pick it up with a few more hours use.

"wine /mnt/win_c/windows/notepad.exe" anyone?

aef
25-04-2001, 20:33
Hmm... I rarely (if ever) create a new file from within Emacs; I normally just fire up a copy for every file I'm editing (well, I'm normally sitting at a machine with at least 256MB RAM).

emacs <filename> will create a new file of that name if it doesn't already exist, in case you hadn't realised. (Well, actually it creates the file when you do your first save.)

control-x control-f will give you a new buffer :)

AEF

[Edited by aef on 25-04-2001 at 08:45 PM]

Jiveman
25-04-2001, 22:30
Cheers mate :)

I must remember not to play all the games, keeps crashing stuff :P