Community
    • Login

    2 colorations syntaxique au sein d'un même fichier, possible ?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 1.8k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • amkp gamyA Offline
      amkp gamy
      last edited by

      Bonjour et merci au dev de notepad++ !

      Je me sers régulièrement de cet éditeur pour du code PHP, CSS,JS.

      Est-il possible de configurer notepad++ pour avoir 2 type de colorations syntaxique au sein d’un même ficher ?

      Un exemple tout simple: une page HTML avec une balise <style type=“text/css”>

      La coloration serait active pour tout le HTML
      ET
      active à l’intérieur de la balise <style> pour du CSS


      Hello and thank you to the notepad ++ dev!

      I use this editor regularly for PHP, CSS, JS code.

      Is it possible to configure notepad ++ to have 2 types of syntax highlighting within the same file?

      A simple example: an HTML page with a tag <style type = “text / css”>

      Syntax highlighting would be active for HTML
      AND
      active inside the <style> tag for CSS

      EkopalypseE andrecool-68A 2 Replies Last reply Reply Quote 1
      • EkopalypseE Offline
        Ekopalypse @amkp gamy
        last edited by

        @amkp-gamy

        I thought this is already the case for html, isn’t it?

        1 Reply Last reply Reply Quote 0
        • amkp gamyA Offline
          amkp gamy
          last edited by

          @Ekopalypse
          What do you mean ?

          EkopalypseE 1 Reply Last reply Reply Quote 1
          • andrecool-68A Offline
            andrecool-68 @amkp gamy
            last edited by

            @amkp-gamy
            If one file has CSS and HTML …then the backlight will only work one)

            1 Reply Last reply Reply Quote 0
            • EkopalypseE Offline
              Ekopalypse @amkp gamy
              last edited by

              @amkp-gamy

              The html lexer is one of the few, if not the only one, lexers which uses multiple lexers
              under the hood. It styles html, js, perl, vbs, python and I assumed it does CSS as well
              but obviously this is not the case. At least with the current used scintilla version but
              I don’t know if a newer scintilla version would have CSS integrated into html lexer.

              Sorry, but I don’t think that there is a way to make two builtin lexers working at the same time. What one could try is to use a technique like described here but to be honest I haven’t much experience in css to understand its basic layout meaning. If you want to discuss this further let me know - will be online gain in about 7-8 hours.

              1 Reply Last reply Reply Quote 3

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors