Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Emacs or Vi?

 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Tim LeMaster
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vi - switching between insert mode and command mode simplifies commands and prevents "emacs pinky" from constantly holding the ctrl key.

Oh no, did I really post to a emacs vs vi holy war thread!
[ March 28, 2008: Message edited by: Tim LeMaster ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vi because I learned it first and never bothered with emacs. Of course I live in the year 2008 so my use of vi is very minimal these days.
 
Henry Wong
author
Marshal
Pie
Posts: 21199
81
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"vi", because "emacs" users are infidels...

Henry
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vi, because Vim gave it a new lease on life.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neither. They both blow.
 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vi because I learned it first and never bothered with emacs.

ditto

Neither. They both blow.

And a non-blowing alternative would be?

Aloha,
Doug

-- Nothing is impossible if I'mPossible
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vi because emacs isn't on all the machines I use. I like it for quick changes or UNIX scripting. For Java, I prefer to use a graphical IDE. Even though I still mostly use the keyboard, I find it faster.

My favorite vi thing was in grad school. I was trying to update files on a very slow dialup connection. I used vi to "type ahead" a bunch of commands and then stopped and saw all the output.
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what Gregg said
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Doug Slattery:
And a non-blowing alternative would be?
They all blow.
 
Srikanth Raghavan
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
VIM. Plain VI is still a nightmare. I was *playing* with VI when I was in college, but after I started working I used only Eclipse. When I used VI after a very long time, I came to know that I forgot everything except "ESC:q!" (the safety exit command).

Now occasionally I use VIM, I would like to learn Emacs too. But not in the near future. I have other things in my list to master that are more important. But it's good to know VI though, it's on every damn *nix machine.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
Neither. They both blow.


Must be one of those... Mac users.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eh. I use vi often enough on my Mac. It's easy and familiar, and it's immediately available on any unix (and installable on Windows). Good enough for me.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've only been using *nix for 20 years or so, not long enough to learn Emacs.
Back then, many terminals didn't have a good meta key, so I stayed with vi.

Plus I really started on TOPS-10 with teco, which also used the ifoo$ model to insert foo at the current point.

I found vi or vim on every computer I care about, so its enough. I do far more typing into eclipse or netbeans or horrors Word anyway
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently a lone voice in the wilderness, once again. Why do I even hang out with you people? :roll:

Emacs, you insensitive clods!

(Actually, the answer is "both". I'll use vi to do quick, little things, Emacs to do any actual coding when I'm not using an IDE. It's nice to know vi for when you're in single-user mode, fixing a corrupted filesystem.)
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I took off the arrow keys from my keyboard and switched them with h,j,k,l
 
fred rosenberger
lowercase baba
Bartender
Posts: 12146
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started using emcas in 5th grade, when my dad brought home a dumb terminal and an acoustic modem. those were the days, when you could read the text faster than it downloaded...

My father was curious about the whole vi vs. emacs thing (he was a BIG emacs guy). He even went so far as to do an informal survey among everyone he knew.

almost without exception, people liked whichever they used first. and i mean REALLY used, not just tried it for 10 minutes...
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

vi because I learned it first and never bothered with emacs.

ditto
 
Peter Rooke
Ranch Hand
Posts: 848
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vi - as it was so painful to learn - it's not easy to forget Powerfull text editor - so i've stayed with it. Even have cream / gvim on the PC.

As for Emacs - I've never used it, the first unix editor I recall using was ed, so vi was a big improvement.
 
Joe Ess
Bartender
Posts: 9300
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pat Farrell:
I've only been using *nix for 20 years or so, not long enough to learn Emacs.


*golf clap*

My personal favorite text mode editor is nano, but I find myself having to fall back on VI in order to get things done on other people's computers.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like i also join with most of the folks who happened to know and work with 'vi' first and without having any other good reason to work with 'emacs'.

I guess mostly 'vi' becomes the defacto editor. Is nt it?
 
Hongli Li
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used vi since I like steve vai
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hongli Li:
I used vi since I like steve vai


That's a different but plausible answer!
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:
Apparently a lone voice in the wilderness, once again. Why do I even hang out with you people? :roll:

Emacs, you insensitive clods!

(Actually, the answer is "both". I'll use vi to do quick, little things, Emacs to do any actual coding when I'm not using an IDE. It's nice to know vi for when you're in single-user mode, fixing a corrupted filesystem.)


As always, those who advocate emacs are also the evidence of what it is useful for. vi for nerds, emacs for power geeks.

In my 13th year of training, I've still only had 3 students who would not work without emacs. But once they got it, hoooooly s* they were fast and productive. If I had complex programming work to do most of the day, I would certainly prefer emacs over an IDE; I might prefer it over vi once I hit the limits of that tool.

I can still do things in vi* that no other editor seems to be able to incorporate, and I demonstrate those techniques in all Solaris classes I teach, including Java. Which is a bit of a political problem, since Sun wants to enforce, more or less, using NetBeans for everything.

But here's the main thing about vi; there's never a reason for your fingers to leave the keyboard. If we're talking about raw productive speed, nothing wastes time like having to reach for the mouse.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12146
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Michael Ernest:

But here's the main thing about vi; there's never a reason for your fingers to leave the keyboard. If we're talking about raw productive speed, nothing wastes time like having to reach for the mouse.


can't the same be said about emacs?
 
Frank Silbermann
Ranch Hand
Posts: 1407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was forced to learn VI twenty-five years ago in grad school, and though I get increasingly less chance to use it in the Windows world, I feel I am extremely productive with it (for the reasons others have mentioned).

That said, I would never recommend anyone else to learn it. When I learned it, I strongly resented the need to memorize a bunch of meaningless key-strokes to get anything done, and if I had to deal with a several different editors designed around the same principle, each with its own idiosyncratic set of arbitrary mappings, the world would be an ugly place indeed.

Even though I like LISP, I never learned EMACS. After I had finally become competent in VI, I began to meet EMACS enthusiasts, but none of them could point me to a book on the subject, all of them insisting that the online help was sufficient.

I prefer to learn things in a top-down rather than bottom-up fashion; first explain to me the designer's philosophy and basis for making choices when confronted by trade-offs; don't give me the details until you've first given me a mental structure on which to hang them. I was pretty late in my career and no longer working much in UNIX by the time someone mentioned that, yes, a book on EMACS did in fact exist. So I never bothered trying to learn it.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Fred Rosenberger:


can't the same be said about emacs?


Not being an emacs guru, I'm not sure, but I'm 99% sure that the answer is yes. and all of the emacs gurus that I've known really fly with it.

Its clearly very powerful.

You can actually do powerful stuff with vi, but its way arcane.
I probably spend the first year or two using vi with only four or five commands.

Someone up thread mentioned keeping your hands on the keys. Nearly all vi implementations can do movement using jkl keys, but I rarely use them, I use the silly arrow keys on a PC. Slower for sure, but that's what I do.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there's never a reason for your fingers to leave the keyboard.

I can think of a few good reasons to do that, but it would not correct to mention them here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic