Question about using text editors


Hello everyone. I’m new to the forums, so apologies in advance if I’m asking a questions already answered.

I’m writing a new game in Scrivener and using TextWrangler to adjust the code. The code lines I’m showing in TextWrangler are apparently different than the editor is seeing when he’s editing the code. As such, the edits he’s sent me don’t correspond with the same text lines I have. (For example, my code shows a total of 493 lines, but the editor is referring to lines in the 800 range.) I’ve also viewed the code with Sublime Text 2, and TextMate, and I’m still showing the same disparity in the total number of code lines.

Anyone have any experience with this problem, or with the appearance of extra lines in code? I’m thinking it might have something to do with writing the narrative in scrivener and then using TextWrangler to clean up the code, but I can’t seem to find why those extra lines are showing when the editor reads it, and why I don’t get them.


I don’t know anything about either of these programs as I use Notepad++ (or droid edit on my tablet), but just to be sure whether or not it’s the programs, are you sure one of you doesn’t have text wrap on?


Nothing that would explain 300 words difference, but really you should use a text-editor, like Wrangler to write your all your game in. I’ve never used Scrivener but if it’s a word processor (MS Word sort of thing), it’ll handle things very differently to a text-editor and swapping text between the two can cause encoding issues.

Any half decent text/word-wrapping facility won’t count lines that are wrapped, it’ll be more like so:


Let’s assume it is the word processor that’s causing the problem. How can I fix that? Would my only option be to re-type everything?

Also, I’m still wondering why it would appear different in different editors. I checked the code with three different editors and I still cannot replicate the extra lines.



I think I figured it out. It looks like there were invisible indents on several lines that I wasn’t seeing. I used TextMate, selected View > Show Invisible Characters, and that allows me to see the problem. I then removed the extra tabs, and that cleaned it up.

I think that when I write the manuscript in Scrivener (my word processor) there’s a formatting thing going on that’s dropping in those extra tabs that were showing up as invisible. I’ll have to try to sort that out, but at least I know where the problems is.

Thanks for the suggestions, everyone. Much appreciated.