PHP HİGHLİGHTS

Hi when I write html codes in php file, highlighting does not work properly, for example, when I click on div tag, it selects all div. I want to see the closing highlight of the tag I clicked. I deleted the program and reinstalled it but it doesn't work. Please help me. 

 

8 comments
Comment actions Permalink

Hi there,

TBH it's not clear for me what the issue is.

Can you please:

1) Share the actual file (so we both try the same code)

2) Try recording a small screencast (e.g. https://recordit.co/ or alike) -- it should give a better understanding on what is happening there.

3) Try with all custom (not bundled by default) plugins disabled (restart IDE after disabling).

4) Try using standard Light theme (IntelliJ Light) -- it may better show certain nuances than Darcula or other dark theme.

 

 

0
Comment actions Permalink

1)

<?php get_header(); ?>
<div class="main-container" id="main-container">


<div class="section-wrap pt-20 pb-20">
<div class="container">
<div class="row">

<div class="col-md-9 blog__content mb-30">
<div class="entry">
<div class="single-post__entry-header entry__header">
<h1 class="single-post__entry-title"><?php the_title(); ?></h1>
</div>
<div class="entry__div-holder">
<div class="entry__div">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>

</div>
</div>
</div>
</div>
<!-- Sidebar Alanı -->
<?php get_sidebar(); ?>
<!-- Sidebar Bitti -->
<?php if ( comments_open() || get_comments_number() ) :
comments_template();
endif; ?>
<div class="col-md-12">
<div class="entry">
<div class="basliklar"><i class="fa fa-comments-o"></i>YORUMLAR</div>
<div class="mobilyorum">
<?php if ( have_comments() ) : ?>
<ul class="commentlist">
<?php wp_list_comments('type=comment&avatar_size=30&callback=zeus_comment'); ?>
</ul>
<?php else : ?>

<?php if ('open' == $post->comment_status) : ?>

<?php else : // yorumlar kapalı ?>
<p class="nocomments">Bu Gönderiye yorumlar kapalıdır</p>
<?php endif; ?>
<?php endif; ?>

</div>
</div>

</div>
</div>
</div>

</div>

</div>
<div id="back-to-top">
<i class="fas fa-chevron-up"></i>
</div>
</main>
</div>
<?php get_footer(); ?>

2) https://recordit.co/caojvYm5Ex

3) no extra plugins installed

4) you see it in the video I tried but it did not work.

0
Comment actions Permalink

So .. your issue is that when you place caret on "div" it "highlights" ALL "div" occurrences?

If so -- look at the style "Settings/Preferences | Editor | Color Scheme | General | Code | Identifier under caret". You can change the color for Background style. NOTE: If you untick option for background, it will not apply any color ... but it will also affect other languages (e.g. PHP) where it is quite handy to have.

https://recordit.co/tNBWC45J8w

TBH I do not remember if it was like that earlier or if it's some recent change. But it does look inconvenient if you need to see what active element is.

If it's not -- try to describe your issue again.

0
Comment actions Permalink

You may try increasing opacity here instead, it should make matching tags more visible:

Settings (Preferences on macOS) | Editor | General | Appearance | Opacity

 

0
Comment actions Permalink

Thank you for your answers but I just want to see where the tag I clicked is closed I don't want other divs to be highlighted is such a thing possible? As in notepad ++ and visual studio code.

 

Example : https://recordit.co/op2IJviY3z

0
Comment actions Permalink

On a side?

With "Enable HTML/XML tag tree highlighting" option disabled:

But if you want to see such line/marker on actual indent guide lines (like in Notepad++) that is always visible and easy to spot... then PhpStorm does not have such stuff.

0
Comment actions Permalink

It makes me sad that PhpStorm doesn't have such a simple feature. :( instead of seeing colored tags, I just wanted to see the label highlighted that I clicked. Thanks for everything though !

0
Comment actions Permalink

I am pretty sure PhpStorm used to have this feature, but it seems to have been overridden by tags tree highlighting.
Not sure if it mitigates the issue for you to any extent, but you can actually visually find the matching tag if you place the caret into the opening bracket of the opening tag or the closing bracket of the closing tag: https://recordit.co/cqr1Hi6CM5
Also, please note that the indent guide is more pronounced in this case if the opening and the closing tag are at the same indent level.

0

Please sign in to leave a comment.