• 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: How are we supposed to paste text in XCode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How are we supposed to paste text in XCode?


  • Subject: Re: How are we supposed to paste text in XCode?
  • From: David Alger <email@hidden>
  • Date: Fri, 9 Jun 2006 11:48:57 -0500

Xcode has a setting in the Text Editing preference pane that lets you specify what type of line ending to use for new files. It also lets you specify what line ending to use or will preserve the file line ending of pre-existing files. Xcode is supposed to support Unix(LF), Mac(CR), and Window(CRLF).

Hope this helps,
David Alger

Family Friendly Software, LLC
http://www.familyfriendlysoftware.com



On Jun 9, 2006, at 7:40 AM, Jerry wrote:


On 9 Jun 2006, at 13:11, Markus Hitter wrote:


Am 09.06.2006 um 05:08 schrieb Jim Wintermyre:

As mentioned above, this is a major hassle with the source control system when the file to be checked in has the wrong line endings. It's not noted when you check the file in (only when adding a new file), and if you check in a file this way, it comes back all screwed up as you might expect.

I'd expect my source control system to give me back exactly what I've checked in.

It's a big problem when you modify a file, XCode changes all the line endings, you don't notice and commit the changes. You end up with the whole file being modified twice (because you need to change the endings back again) which makes file merging incredibly difficult and really messes up your change history.


Any idea what might be causing this?

What stops you from changing all source and header files from \r to \n as part of the transition to Xcode? This will match Mac OS X's native line endings as well as the line endings Xcode's maintainers use (at least it matches what all the example code I've looked into uses).


It can be as easy as

	find /my/path/to/source -type file -name \*.h | while read F; do
		mv "$F" tempfile
		cat tempfile | tr '\r' '\n' >"$F"
	done
	rm -f tempfile

Repeat accordingly for other file suffixes.

Obviously, Mac line endings will die in the long term as there's no longer a platform using \r as native line endings.

True, but Windows ones won't and all our cross-platform code has Windows line endings except where XCode has changed them into Unix ones :-( This is a double pain because the SCC we use on Windows can't cope with anything other than Windows line endings (I know, I know) and as the sole Mac developer, I keep getting into trouble with the rest of the development team.


What I'd really like to know is what actions cause the line endings to change so that I can avoid doing them. I'm reluctant to give up on pasting text....

Jerry

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40millertel.net


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: How are we supposed to paste text in XCode? (From: Jim Wintermyre <email@hidden>)
 >Re: How are we supposed to paste text in XCode? (From: Markus Hitter <email@hidden>)
 >Re: How are we supposed to paste text in XCode? (From: Jerry <email@hidden>)

  • Prev by Date: Extending Xcode...
  • Next by Date: Re: Custom icon for bundle?
  • Previous by thread: Re: How are we supposed to paste text in XCode?
  • Next by thread: Re: How are we supposed to paste text in XCode?
  • Index(es):
    • Date
    • Thread