5 Replies Latest reply on Dec 1, 2017 3:38 AM by Dude!

    How to word wrap when exceeding the width of screen using 'Syntax Hightlighting' ->'SQL' in editor ?

    Quanwen Zhao

      Hello,Admins

       

      Recently I use 'Syntax Highlighting' --> 'SQL' to quote my sql statements in editor and long statements have been encountered to truncate when exceeding the width of screen.

       

      In the meantime,there has a long scroll bar in the bottom of the QUOTE content,see two snapshot as follows,

      4.png

       

      3.png

      Now,I think that it's a good idea about if word wrapping in this situation.That's to say I will never drag that boring scroll bar for browsing out of sight.

       

      Best Regards

      Quanwen Zhao

        • 1. Re: How to word wrap when exceeding the width of screen using 'Syntax Hightlighting' ->'SQL' in editor ?
          BluShadow

          It's a known issue that the syntax highlighting of the editor isn't brilliant.  Aside from the issues you mention there are issues about the way it get's shown when people quote it in a reply, sometimes with whitespace being lost, and also when people copy the code out of your post to their own editor; where it copies all the line numbers too, which can be a pain to get rid of before the code can be used.

           

          A better option is to use the Advanced Editor, select the code in your text, choose "Courier New" font, and then choose the ">>" button and "Quote" which makes it just as readable, whilst allowing for the code to be copied easily, and also does the word wrapping naturally.  You can then also highlight parts of your code with colours and bold manually, which is good if you're trying to point out parts of it to other people.

          1 person found this helpful
          • 2. Re: How to word wrap when exceeding the width of screen using 'Syntax Hightlighting' ->'SQL' in editor ?
            Dude!

            When posting code, I do no want to have the lines wrapped automatically or be adjusted to the current screen width, which varies among different users. It usually breaks the presentation of my code and can prevent people form using copy and paste.

             

            Automatic line wrap may work for languages like SQL, which use a semicolon to terminate lines, but it does not necessarily apply to other languages, such as command line and shell scripts. Automatic line wrap could be applied when choosing "SQL" highlighting, but it should not be applied generally.

             

            Perhaps you would like to outline your point or make such suggest in Oracle Community Ideas as an editor improvement. But better not expect to have it changed any time soon.

            1 person found this helpful
            • 3. Re: How to word wrap when exceeding the width of screen using 'Syntax Hightlighting' ->'SQL' in editor ?
              Quanwen Zhao

              BluShadow wrote:

               

              It's a known issue that the syntax highlighting of the editor isn't brilliant. Aside from the issues you mention there are issues about the way it get's shown when people quote it in a reply, sometimes with whitespace being lost, and also when people copy the code out of your post to their own editor; where it copies all the line numbers too, which can be a pain to get rid of before the code can be used.

               

              A better option is to use the Advanced Editor, select the code in your text, choose "Courier New" font, and then choose the ">>" button and "Quote" which makes it just as readable, whilst allowing for the code to be copied easily, and also does the word wrapping naturally. You can then also highlight parts of your code with colours and bold manually, which is good if you're trying to point out parts of it to other people.

               

              Hello,BluShadow

               

              Your suggestions is very nice. I have tried "Quote" from the ">>" button and It's also what I expected.

               

              Thanks sincerely for your opinions.

               

              Best Regards

              Quanwen Zhao

              • 4. Re: How to word wrap when exceeding the width of screen using 'Syntax Hightlighting' ->'SQL' in editor ?
                Quanwen Zhao

                Dude! wrote:

                 

                When posting code, I do no want to have the lines wrapped automatically or be adjusted to the current screen width, which varies among different users. It usually breaks the presentation of my code and can prevent people form using copy and paste.

                 

                Automatic line wrap may work for languages like SQL, which use a semicolon to terminate lines, but it does not necessarily apply to other languages, such as command line and shell scripts. Automatic line wrap could be applied when choosing "SQL" highlighting, but it should not be applied generally.

                 

                Perhaps you would like to outline your point or make such suggest in Oracle Community Ideas as an editor improvement. But better not expect to have it changed any time soon.

                 

                Hello,Dude!

                 

                Thanks for your relevant suggestions.

                 

                Best Regards

                Quanwen Zhao

                • 5. Re: How to word wrap when exceeding the width of screen using 'Syntax Hightlighting' ->'SQL' in editor ?
                  Dude!

                  Putting code inside quotes only works until you realize that certain character combinations are being translated to smileys, etc.