I use DropBox on both a windows and a mac.

Whenever I add lines to a .txt file on my mac and sync it with DropBox to my windows, the "new lines" are skrewed up when reading the file on my windows, and vice verse.

My mac insists to use it own form of new lines even so that the file was created with a different type of new lines. The end result is a file with mixed new line types.

I know that new lines are different on windows and mac os x (and on linux for that matter) and I know that this is the problem. See http://en.wikipedia.org/wiki/Newline

I would expect textedit in OS X to detect the type of new line used and stick with it.

Is there anyway that I can accomplish that ?

1 Answer 1


Which editors and viewers do you use?

This topic describes how to set newline in BBedit and Textmate. Also you can use TextWrangler and Notepad++ which are freeware

PS: I commonly use Vim in Windows and Mac (MacVim). In this editor I do ":set fileformat=dos" to convert to CR-LF

  • I currently use Textedit in OS X and Notepad/Wordpad on windows. So my problem seems to be Textedit. I am not looking for a system wide change (not that I even think it is possible, nor desirable)
    – Benjamin
    Nov 10, 2011 at 11:21
  • System wide change for this setting is not possible. By the way, you can give a try for Notepad++ and TextWrangler(AppStore) which are free and understand both CR-LF and LF notations
    – Eir Nym
    Nov 10, 2011 at 11:39
  • I will give TextWrangler a shot, but I still hope for a solution for the build in Textedit in OS X for others that stumble across the same problem. It would be a .pref hack or there might be other ways.
    – Benjamin
    Nov 10, 2011 at 12:01
  • 1
    Notepad in Windows like Textedit in Mac OS X is software with very limited functions. Other way is use other formats such as RTF or simple *doc (so you have use wordpad in windows)
    – Eir Nym
    Nov 11, 2011 at 10:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .