Hi There
This is due to the difference in end-of-line characters between Windows and basically every other os now a days. To get a hard retur in Textedit, press ctrl-q then ctrl-m. Anyone familiar with Emacs will recognize this, but for those who don't, ctrl- q means insert a specific control character, and ctrl-m is the equivalent of a hard return (or carriage return as it's known in Windows). You can use this keystroke anywhere, though off hand I can't think of many situations other than text files when you'd need it. Note, Windows requires both a newline (linefeed) and a carriage return to end a line in a text file. What OS X calls "new line" is a linefeed, so what you'll need to do is press return, then ctrl-q, then ctrl-m to put both characters in, and in the proper order. If you don't use both, your file will appear even more messed up than before. If you're going to be doing this a lot, I'd suggest using Smultron or a similar editor that has the ability to auto-convert these end-of- line characters at any time. That way you don't have to do it manually by search and replace.
hth
P.S. For the curious, most other Emacs ctrl commands work in OS X too. Try them out if you're bored sometime.



On Jan 14, 2009, at 15:36, Simon Cavendish wrote:

Listers, I have a dilemma in that I need to use the same text file under windows and Mac. The text file is specific in the sense that I keep records in it, one record per line. What happens however is that when I press the enter key for the new line in order to type in a new record in Textedit, when I subsequently open the same file in Notepad under Windows or I get more than one record on one line. It is as if there are no hard line breaks in Textedit. This causes me a bit of grief as I need to scan my records very quickly by just arrowing down the list so I sometimes miss a record because there are more than one on one line if I'm not being too obscure. Is there a keystroke that would execute a return in Textedit?

Thanks for your help.

Simon


The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.
        --Douglas Adams


Reply via email to