• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: beginning C part 2 [OT]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: beginning C part 2 [OT]


  • Subject: Re: beginning C part 2 [OT]
  • From: Sheehan Olver <email@hidden>
  • Date: Sun, 3 Aug 2003 17:54:41 -0400

Just thought I'd give a couple of tips as far as using GUI text editors from the command line. First of all, typing:

open foo.c

will open foo.c in the default editor for .c files (usually Project Builder, same as double clicking the file). I also recommend adding a few aliases to your .cshrc:

alias pb open -a "/Developer/Applications/Project\ Builder.app/"
alias sute sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit

That way typing pb foo.extension will open Project Builder regardless of what its default editor is (this is equivalent to dragging on to the dock icon). sute will open the document as root, good for editing unix config files owned by root (sure that really has nothing to do with c, but it's still useful). Note that since its not using the open command, sute won't fork without a trailing &, and also multiple invocations of sute will result in multiple TextEdit.app's being open.

Sorry for the off topic discussion, but for someone doing programming in C from the command line who doesn't want to deal with learning vi or emacs, these tips are pretty useful.



On Sunday, August 3, 2003, at 08:21 AM, email@hidden wrote:

The best editor you can use to do a c program isn't Text Edit but Project
Builder. And with developper tools you will finc many sample code, tutorial,
and tricks to use Project Builder. You will find also gcc and any tools to
compile and debug. The question is more can you do a C program without the
Apple Developer Tools;-). I don'think.
Good luck!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: beginning C part 2 [OT]
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: (no subject)
  • Next by Date: Distributed Object class loading semantics
  • Previous by thread: Re: (no subject)
  • Next by thread: Re: beginning C part 2 [OT]
  • Index(es):
    • Date
    • Thread