-1

Where's the word wrap setting for the editor in Delphi XE? I can't find it in Tools -> Options -> Editor Options.

Tony_Henrich
  • 42,411
  • 75
  • 239
  • 374
  • See, perhaps : http://docwiki.embarcadero.com/RADStudio/en/Formatting_Source_Code Also : http://stackoverflow.com/questions/402737/delphi-code-formatter – J... Mar 14 '15 at 00:12

1 Answers1

7

There is no word wrap setting. The IDE's Code Editor does not support word wrap. To wrap long lines, use the Enter key.

Ken White
  • 123,280
  • 14
  • 225
  • 444
  • 1
    I use many editors and they all have word wrap feature. Even Windows little NotePad has it. Word wrap is not a word processor only feature. I am opening an existing app, not coding myself so hitting Enter is not a feasible option. I find the lack of word wrap in a complex IDE odd. – Tony_Henrich Mar 13 '15 at 23:40
  • 2
    Sorry. I answered the question you asked. If you want to complain about the lack of word wrap support, you'd have to discuss it with Embarcadero - it's their editor. :-) The RAD Studio IDE Code Editor has never supported word wrap, AFAIK. I did rephrase my answer, however. – Ken White Mar 13 '15 at 23:42
  • The edit is good. Many IDEs offer word wrap. RAD Studio doesn't. Personally I don't miss it for most editing tasks. – David Heffernan Mar 13 '15 at 23:47
  • 3
    @Tony_Henrich To call notepad a code editor is a bit of a stretch. The requirements of something like notepad are very different from an IDE. Indenting, for example, is not an issue with Notepad. I am not saying that it should or shouldn't have the setting, just that the implementations are different. Personally, I would prefer to reformat the code with a code formatter than use something like wordwrap. That just kicks the bucket down the road for another developer to battle through. – Graymatter Mar 13 '15 at 23:50
  • @Graymatter It's a text editor. Whether for code, blogs, letters to grandma is immaterial. BTW, many programmers use Notepad to write scripts, html, css and other programming tasks. If that's a stretch then use Notepad++ as another example. It's still the same principle. I don't understand why some people are arguing against including it. If you don't like word wrapping, simply TURN IT OFF. Some of us who like to leave side menus open which take away from the work area width and who do not like horizontal scrolling, word wrap helps here. – Tony_Henrich Mar 13 '15 at 23:57
  • Code formatting is not a good solution if you're sharing the same code with other developers. They might hate your code format style. Wordwrap doesn't change the code in the file, It's just a real time way to display the code depending on the visible editor width – Tony_Henrich Mar 13 '15 at 23:59
  • 2
    @Tony_Henrich: I don't know why you're arguing with us - none of us has any control over the design of the IDE's code editor. If you want to debate it's merits, do so with Embarcadero, who has the ability to change it. The fact of the matter is that the Code Editor **does not support it**, so your question here has been answered. – Ken White Mar 13 '15 at 23:59
  • @Tony it would cost to implement the feature. In order for Emba to do so they'd need to decide that it had more benefit than alternative candidates. – David Heffernan Mar 14 '15 at 00:04
  • @Ken I know no one here has control. I was replying to comments which weren't in favor of word wrapping. You also changed your answer after I commented on your word processing comment. Anyway, I am accepting the answer and moving on. – Tony_Henrich Mar 14 '15 at 00:18
  • 1
    I don't even understand the advantage of such a feature. It would be a nightmare in the real world. First of all, writing code is **far** different from writing letters to grandma. Second of all, even Notepad word wrap sucks - open a file which once saved without word wrap, turn word wrap on (thus adding line breaks), and then save the file... Oh wow it saved all those line breaks with it so I now will never know where there once were or weren't line breaks. @Tony_Henrich For someone with as much reputation as you have here, you should know better than to argue these facts. – Jerry Dodge Mar 14 '15 at 00:24
  • @Tony_Henrich I understand that notepad can be used for code. So can wordpad. My point is that the requirements for an IDE are different from those in something like notepad. Things like block selection, indenting, etc. don't work very nicely with word wrap in place. Notepad itself actually removes the status bar giving the line numbers when you enable word wrap. On the formatting side, in every environment that I have worked there has been a preferred coding style. Any code not adhering to that style would be formatted in line with the style. It makes like much simpler for all developers. – Graymatter Mar 14 '15 at 00:45
  • @Gray Notepad is a toy. A good text editor has line numbers and word wrap and the line numbers in the gutter make it clear what's what. – David Heffernan Mar 14 '15 at 13:09
  • Writing multiline comments is a nightmare using “manual” word wrap, so yes, I indeed and definitely sustain that lacking word wrap feature is a huge mess here. – Zoltán Bíró May 05 '22 at 16:01