Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > emacs?

emacs?
Thread Tools
Samad
Fresh-Faced Recruit
Join Date: Nov 2001
Location: home
Status: Offline
Reply With Quote
Apr 29, 2005, 02:50 AM
 
Do you guys use emacs, vi, or other standard Unix text editors for development? Since OS X, we've become very Unix-savvy. As anyone who follows the Unix tradition will tell you, these text editors are better because they make the job more efficient at the cost of a high learning curve. Has anyone tried to make the switch from XCode or BBEdit to emacs or vi? (As in, would you guys like to share personal experiences, struggles, triumphs, or failures?)
     
I was David B.
Registered User
Join Date: Jan 2005
Location: there are days when I wake up and thats exactly my question
Status: Offline
Reply With Quote
Apr 29, 2005, 02:16 PM
 
Originally Posted by Samad
Do you guys use emacs, vi, or other standard Unix text editors for development? Since OS X, we've become very Unix-savvy. As anyone who follows the Unix tradition will tell you, these text editors are better because they make the job more efficient at the cost of a high learning curve. Has anyone tried to make the switch from XCode or BBEdit to emacs or vi? (As in, would you guys like to share personal experiences, struggles, triumphs, or failures?)
Failure.

I sometimes use emacs and i also tried to learn vim. Sucks. If you have to be productive and if you are used to BBedit standards, you won't have fun.

For example: The emacs speedbar is nice (if you have a lot of screen real estate), but its way behind the function parser of bbedit, that does not go into your way until you click it (ok, he speedbar is more than a function parser). The killer for emacs was that I tried to change the syntax colors (and had to give up after too many hours). This green, violet, brown style is weird.

Vim (and also emacs) uses a lot of unusual commands. Besides vim is modal (very nasty and old fashioned). But I have a collegue, who works vim-only. He is very productive with it.

But on a mac you have your shortcuts also for bbedit. The statement "I am more productive" might mean that you can do everything from the commandline. Thats fast and thats an advantage on linux or windows. But on mac it is standard anyway.

So my statement is: You are most productive on the system you know best. If you configure bbedit and use launchbar the mac is hard to beat.
     
PBG4 User
Senior User
Join Date: Feb 2001
Location: Deer Crossing, CT
Status: Offline
Reply With Quote
Apr 29, 2005, 02:22 PM
 
When I took my UNIX class at school we had an oooooollldddd time UNIX geek for a teacher. He totally flew in vi, it was like watching a concert pianist. I think the real problem is learning all the keyboard shortcuts and grokking the power of them in fullness.
20" iMac G5! :D AND MacBook 1.83GHz!
Canon Digital Rebel Kit + 75 - 300mm lens. Yum Yum! :D
Check out my OS X Musical Scales program
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Apr 29, 2005, 02:36 PM
 
I am far too spoilt on GUI editing.
[Wevah setPostCount:[Wevah postCount] + 1];
     
parallax
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
May 25, 2005, 02:39 AM
 
So my statement is: You are most productive on the system you know best. If you configure bbedit and use launchbar the mac is hard to beat.
This is certainly true, but only vacuously. That doesn't mean that a fair investment in other systems won't make you /more/ productive; all that means is that you have to spend the time to do so. :-) (Again, a vacuously true statement, but a counteracting one)

I grew up using ClarisWorks and TeachText and SimpleText as my main modes of editing stuff... I used BBEdit Lite a little bit before OS X came, and then promptly switched to XCode for all of my coding. I soon fell in love with emacs (LISP is beautiful) but eventually switched to vim. Why vim over emacs (thus settling the eternal debate ;-))? Well, in short, I like both for different tasks but vim starts up faster, has less feature bloat, and all in all, once you've learned both systems, stuff in vim is much quicker than stuff in emacs (measured by keystrokes). It's hard to argue with that, but the rest (ease of use, comfort) is up to preference. Also, vim is much better on the RSI front. Even though I've switched my control key to where it should be (the caps lock key) like the good old ][gs, it's still tiresome to reach for that every time I want to do something.

All in all, I write everything with vim, from papers to code to quick little memos.

GUIs are wonderful and all, but when it comes to text editing I find it hard to argue with decades of engineering. :-)
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
saddino
Mac Enthusiast
Join Date: Nov 2003
Status: Offline
Reply With Quote
May 25, 2005, 09:55 AM
 
I guess I'm more of a dinosaur than I thought, because when I used to program on UNIX I exclusively used the line editor ("ed" in AT&T System V UNIX, then "ex" in BSD -- both still available in Mac OS X).

You might think that using a non-visual UI is an impossible way to write code, but over a 300 baud terminal, you could "type ahead" faster than the UI could follow, and thus code away (unlike waiting for the visual feedback in vi or emacs) into standard input knowing that eventually the process would catch up. A typical fix for a typo on line 234:

ex main.c
234
s/printf/printg
w
q
make

So, you can imagine that typing that in would take no time at all -- much faster than opening a visual editor.

It also really helped me learn how to "visualize" the existing code in my head, since I didn't have the luxury of seeing it whole unless I went ahead and viewed some lines in standard output (e.g. "1,24p" would scroll out the first 24 lines).

Amazingly, I coded this way for 5 years. My first introduction to coding on the Mac and Windows 3.1 were mind blowing and very hard to get used to. However, now there is no possible way I would ever go back to that style.
     
Samad  (op)
Fresh-Faced Recruit
Join Date: Nov 2001
Location: home
Status: Offline
Reply With Quote
May 25, 2005, 05:09 PM
 
I tried emacs but found the number of keyboard strokes to use it difficult to get used to. I might try and learn vim (thanks to you, parallax).
     
si_lance
Dedicated MacNNer
Join Date: Nov 2003
Location: SoCal
Status: Offline
Reply With Quote
May 25, 2005, 11:39 PM
 
I use emacs (x-windows version) over Tarantella, and I like it alot. I even set the EDITOR environment variable to be /usr/bin/emacs. I do, however, admit that had I not been forced to use it all through college, I probably would have obstained from using such an old school editor.

.emacs is your friend
     
GSixZero
Mac Elite
Join Date: Aug 2004
Location: Seattle, WA
Status: Offline
Reply With Quote
May 25, 2005, 11:55 PM
 
I use vi more than BBedit, but that's just because I do most of my raw text editing on other machines through ssh.

ImpulseResponse
     
Samad  (op)
Fresh-Faced Recruit
Join Date: Nov 2001
Location: home
Status: Offline
Reply With Quote
May 28, 2005, 01:58 AM
 
I got the book "Learning the vi editor" by Linda Lamb and Arnold Robbins from the library and I'm already starting to like vi a great deal. emacs commands take a lot longer to enter and it has far more features can I could use. I doubt I'd ever use lisp, unless I decide to change my major to computer science.
     
Samad  (op)
Fresh-Faced Recruit
Join Date: Nov 2001
Location: home
Status: Offline
Reply With Quote
May 28, 2005, 02:17 AM
 
By the way, it would be great if Xcode had ways to extend it. It would be great if one could install a plugin that overrides Xcode's editor. That way, one could write a plugin that when you open a file in Xcode, you would get a vi or emacs session, right within Xcode.
     
Juggle5
Junior Member
Join Date: Nov 2001
Location: Seattle
Status: Offline
Reply With Quote
May 28, 2005, 05:32 PM
 
I started out using emacs, but switched to vim after I saw one of my friends using vim--he could make changes insanely fast. So I tried vim, and gave it about a week; it was slow and painful at first, as there's a bit of a learning curve. But after a few days I could edit files as quickly as before. After another month or two, I picked up enough tricks to be super fast at editing. So now I usually use vim to edit files, especially if I'm doing lots of coding.. Xcode is nice, but seems much slower.

On the other hand, if I'm typing letters, recipes, or non-programming documents, I'll often just use Textedit. I've found it's more useful to see what the document will look like as I'm typing than to have lots of cool shortcuts, which tend to speed up editing code but not so useful for general text.
     
Arclite
Junior Member
Join Date: Sep 2003
Location: Nowhere, Missouri
Status: Offline
Reply With Quote
Jun 20, 2005, 02:52 AM
 
Samad: Xcode already supports this. No need for plugins.

Open Xcode's preferences (command-,)
Click the "File Types" tab in the toolbar.
Click the "file" disclosure triangle
Click the "text" disclousre triangle

Use the menu at the right of the rows to select a different editor (vi and emacs are both included)
     
Juggle5
Junior Member
Join Date: Nov 2001
Location: Seattle
Status: Offline
Reply With Quote
Jun 21, 2005, 02:17 AM
 
Arclite: that's pretty spiffy. Thanks.
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Jun 21, 2005, 09:02 PM
 
I started out on xemacs, actually. I liked the syntax coloring and the tab-indention. However, now it's just extremely bloated, and seems like it takes forever to get anything done. I didn't like Project Builder at first, but once they got the tab-indention right, I never looked back.

Ummm... I also use pico all the freaking time at the command line. I don't edit code this way, though.
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:46 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,