Announcement

Collapse
No announcement yet.

Syntax hilighting doesn't work in diff blocks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aaron
    replied
    In BC4, we also worked to help expose our Tweaks a bit more: Options dialog, Tweaks section, and this is the first option in our 'Editor Display' section.

    Leave a comment:


  • chazcon
    replied
    Originally posted by Erik View Post
    1. Type [Shift+Ctrl+T] to open the Tweaks dialog.
    2. Switch to the "Text Editors" page.
    3. Check "Show Syntax highlighting on difference lines".
    4. Click "OK".


    You'll probably have to adjust your file compare colors as well.
    Awesome just what I needed!

    Leave a comment:


  • alenl
    replied
    Hm, yes, I thought it would make it impossible to see indentation changes that way, but they are just visible in red now, which is ok-ish. Btw, to completely get rid of the blue parts in the above example, the option "orphan lines are always important" needs to be selected as well.

    I can live with this for now, but this way I actually make all whitespace everywhere and all orphan lines important. Generally, I would prefer to have some separate options to make whitespace elements important only in "important" orphan lines (i.e. those orphan lines that have at least some other important elements - keyword, base text, i.e. not comments).

    Thanks!

    Leave a comment:


  • Erik
    replied
    This is intended behavior. If you make leading and trailing whitespace important, it will show in red instead of blue.

    Leave a comment:


  • alenl
    replied
    Ahhhh, didn't even know that dialog exists. Thanks!

    Yes, this is better. If I enable this and make sure all syntax highlight colors are set to some color (not left on default), I will see syntax highlighting in the diff blocks. Tweaking the background colors enables me to even set it up the way Tim suggested - one background color for the chars that changed, another for the rest of the changed line.

    There is one sideeffect when set up that way - as the background color for changed chars highlights even changed spacing some strange effects happen. I have marked embedded whitespace as important, which makes it more readable, but leading whitespace and newlines (one character at the end of line) are now highlighted in blue background even on lines that are added/removed (don't exist in the other pane).

    See the screenshot:



    Since the whole lines are new, I find the blue parts before and after each line a bit odd looking, don't you think? Is this normal, and is there a way to turn it off?

    Thanks in advance for any hints.
    Last edited by alenl; 29-Jul-2008, 09:49 AM. Reason: Cropped the screenshot

    Leave a comment:


  • Erik
    replied
    1. Type [Shift+Ctrl+T] to open the Tweaks dialog.
    2. Switch to the "Text Editors" page.
    3. Check "Show Syntax highlighting on difference lines".
    4. Click "OK".


    You'll probably have to adjust your file compare colors as well.

    Leave a comment:


  • alenl
    replied
    Sorry I didn't respond earlier, somehow I didn't get an email notification that there are replies. Anyway, yes the solution you offer sounds good.

    Btw, I see that the 463 build says this:

    - Added "Show syntax highlighting on difference lines" tweak.

    I have installed the 464 build and I cannot find that. Where is it?

    Thank you very much.

    Leave a comment:


  • Michael Bulgrien
    replied
    That would make sense to me. I would call it the DIFF highlight color.

    Leave a comment:


  • Tim
    replied
    I assume you'd want one background color for lines that have a diff somewhere, and another background color for the diff itself. Is that correct?

    Leave a comment:


  • alenl
    replied
    For me, it would be best to have the syntax change only the font color, while diffs change background and eventually bold the text.

    But I would expect it to be configurable, because there might be people who prefer to give more visual importance to syntax coloring more, and those who'd prefer more importance for diffs.

    Is there any chance this could make it to BC3 before final release? I mean, syntax coloring is most important in the areas where there are some changes, especially if new code is added (entire new functions), which is where you need to use more concentration to review the code, and syntax coloring helps you concentrate on the important things.

    Thanks!

    Leave a comment:


  • Michael Bulgrien
    replied
    I would expect the red/blue coloring to remain in the Text Details pane even if Syntax Coloring was retained in the main intput panes. Otherwise there wouldn't be an easy way to identify exactly what has changed in the line.

    Leave a comment:


  • Michael Bulgrien
    replied
    Hi Alen. There currently is no way to preserve syntax coloring in a difference section... though I agree that preserving syntax coloring and only changing the background color in difference sections would be a nice feature.

    Leave a comment:


  • alenl
    started a topic Syntax hilighting doesn't work in diff blocks

    Syntax hilighting doesn't work in diff blocks

    Is there a way to set up the text compare colors (Tools>Options>File Views>Compare Colors) so that the syntax highlighting is visible even in difference blocks? The way it is by default, syntax works everywhere except in the diff blocks, which are red/blue.

    I'd prefer to be able to set it up so that only the background of the diff is red/blue and the letters are still syntax-highlighted. I've tried various settings but am unable to produce this effect.

    Any help is appreciated.

    Thanks,
    Alen
    Last edited by alenl; 11-Jul-2008, 04:06 AM.
Working...
X