A single line of code should be written to file as a single line - no matter how long. However, the editor you are using should be able to gracefully word wrap it depending on your settings.
Most editors word wrap based on window size or some other hard setting. They should be able to wrap gracefully at a logical point in the code e.g. at a comparison operator or a dot in a function chain. Wrapped lines could be tabbed or visually flagged to let you know.
In other words there should not be am ideal line length for code, but instead editors should be able to adapt to make life easier for developers.
Look at word processor documents, imagine how much of a nightmare it would be if such documents had a hard limit of characters per line.