Creating Txt Documents with TextEdit

ChrisAbalos

macrumors newbie
Original poster
Jul 27, 2005
15
0
Michigan
Hi All,

First time posting, long time lurking.
I am currently in a college html class and we do all our coding in MS notepad on windows machines. At home, i write my code in textedit on my powerbook. When i take the files back to school and load them on notepad again, all the line breaks are lost and appear as boxes. I have textedit set to plain text and the "ignore rich text commands in html files" is checked. My guess is that i should be encoding the document in something other than "western mac osx", i just have no idea what.

Thanks all
 

robbieduncan

Moderator emeritus
Jul 24, 2002
24,594
57
Harrogate
TextEdit is just fine for editing plain text files including HTML. I use it all the time. Just make sure it's in plain text mode. From what I can tell you have already worked this out. You are seeing the difference between Unix line return characters and Windows line return characters. You can convert with the command line utils unix2dos and dos2unix.

Unfortunately my Mac does not seem to have these installed :(

You could try altering the settings in the Preferences (in the Open and Save tab) to save as Western (Windows Latin 1). I'm not sure that this will be enough though.
 

iMeowbot

macrumors G3
Aug 30, 2003
8,643
0
You might have better luck using a different text editor on the Mac, something that can more easily save files with windows-style (CRLF) line endings.

SubEthaEdit (free for personal use) is good for this, you'll find what you need to play happily with Windows under its Format menu.

(edit: Mitthrawnuruodo done beated me to it!!!@!)
 

RacerX

macrumors 65832
Aug 2, 2004
1,504
2
TextEdit in plain text mode should be fine.

If you are worried about line endings, I would suggest using TextExtras (by one of the original developer's of TextEdit). It'll give you the option of using LF, CRLF, CR, PS and LS.

Plus it has a number of other features that are great for Rich Text formatted documents too.
 

ChrisAbalos

macrumors newbie
Original poster
Jul 27, 2005
15
0
Michigan
Thanks everyone for the responce... Im guessing the easiest solution will be to use another app like most of you said. I will check em all out and see which i like best.

Thanks again
 

Kerry Sanders

macrumors regular
Apr 25, 2005
207
0
Hayden, AL
Actually, the easiest solution is to go into the Preferences for TextEdit and set it to save as plain text by default all the time. This will fix your problem. I had the same issues that you mentioned in your post for this thread until I changed this preference.
 

stridey

macrumors 65816
Jan 21, 2005
1,136
0
Massachusetts, Connecticut
Kerry Sanders said:
Actually, the easiest solution is to go into the Preferences for TextEdit and set it to save as plain text by default all the time. This will fix your problem. I had the same issues that you mentioned in your post for this thread until I changed this preference.
Or simply type cmd-shift-T to convert to plain text.