This isn't a problem with BBEdit, it's a problem with your process.
Fix the process. You should be using consistent line endings.

Frankly I'm surprised that the various editors ignore the line
endings.  DOS endings are \r\n, UNIX is \n. BBEdit, if it doesn't
autodetect the DOS endings, it should only show a newline with the \r
set as an invisible at the end of the line, not a second newline
(IIRC, I could be wrong, I usually don't have to work with mixed line
ends). More likely: inconsistant line ends and improper editor and RCS
settings are causing duplicated new-lines and so on in your files. If
this is happening, it will propagate and get even worse.

Fix the process before it gets worse:
1. Choose a line-ending that everyone will use. Document it. Train new
guys on it.
2. Configure your editors for that ending by default. If you have any
editors in the mix that can't be configured, drop that one: it's not
worth using.
3. Configure your RCS to default to the ending. Bonus if you set it up
to detect and warn or reject commits that are screwed up.
4. Reformat all and commit all in one commit. There's about 1000
different automated scripts, programs (astyle), or awk/sed one-liners
and such that can do this all in one shot. Google it.
5. Smile because you _fixed_ the problem.

- Steve

On Mon, Dec 10, 2012 at 5:51 PM, Troy Gillette <[email protected]> wrote:
> I work on a large cross-platform project for Mac and Windows. Every editor
> used on the Windows team treats UNIX and Windows style line endings as if it
> is simply a native carriage return. So if any mixed line endings end up in a
> file, it is completely transparent.
>
> Xcode, TextMate and even TextEdit on the Mac do the same thing.
>
> BBEdit on the other hand, looks at the first line of the file and assumes
> ALL other line endings in the file match that one. So, if you open a file
> with a UNIX line ending on the first line, any lines with Windows EOLs will
> end up with a second empty line after them and if the first line is Windows
> style, any UNIX lines will get mushed together into a single line.
>
> The only way I see to fix this is to make the entire file conform to one or
> the other. This can be a real pain, especially if only the first few lines
> are different because it will mess up everything after that (I see no way to
> force bbedit to load one way or the other, it always chooses for me). It
> also results in excessive/unnecessary changes in revision control.
>
> I understand there are times when you would want to be able to know there
> are differing line endings, but the current system makes life difficult for
> those of us who must cooperate with developers outside of the Mac world.
>
> Is there a chance that we could have a preferences option to make BBEdit
> behave like every other developers editor on the market?
> Is there already such an option that I just can't seem to find?
>
> Thank you in advance for any suggestions.
>
> --
> --
> You received this message because you are subscribed to the
> "BBEdit Talk" discussion group on Google Groups.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> <http://groups.google.com/group/bbedit?hl=en>
> If you have a feature request or would like to report a problem,
> please email "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
>
>
>

-- 
-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>



Reply via email to