Community
    • Login

    Matlab cell mode highlight mechanism

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 2.7k Views
    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.
    • Ms NM
      Ms N
      last edited by

      In matlab, we can ‘section’ the script file into sections by using %% at the beginning of a line. The line itself is treated as a comment.
      How can I get notepad++ to give a different style to comment lines beginning with %% ?
      I am using latest version of notepad++ (Notepad++ 7.5.3)
      I do not want to define a new user defined language for this if possible.

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS
        Scott Sumner @Ms N
        last edited by

        @Ms-N

        I’ve used Matlab a little bit but I didn’t know about code-sections until I read your posting in this thread. If I were you I’d be tempted to not care so much about the color of those lines but rather I’d get them into the Function List so that they appear in there with the normal Matlab "function"s. This assumes that the %% code-section lines also have some text after those symbols (to be meaningful if put in the Function List), but I’d assume most such lines do? The helpers here can give more information about this if you end up wanting to go that way with it…

        1 Reply Last reply Reply Quote 1
        • Ms NM
          Ms N
          last edited by

          Sorry for the late feedback.
          Well, my idea is not to have autocomplete or ‘jump to’ capabilities. But just to have a visual feedback. Also, the text after the %% usually gives brief description of code below and is different for different scripts that i work with.
          I don’t think a function list will do since each script that I receive will have different text following the %%.

          Scott SumnerS 1 Reply Last reply Reply Quote 0
          • Scott SumnerS
            Scott Sumner @Ms N
            last edited by

            @Ms-N said:

            my idea is not to have … ‘jump to’ capabilities

            Well, why not if you get it for free? :-D

            just to have a visual feedback

            So that wouldn’t be my area of expertise but others are here that I think could help with that part.

            the text after the %% usually gives brief description of code below…
            …I don’t think a function list will do since each script that I receive will have different text following the %%

            That’s perfect for the Function List! Think about it! :-)

            1 Reply Last reply Reply Quote 0
            • Ms NM
              Ms N
              last edited by

              I think you are right. I will give the function list method a go.
              https://notepad-plus-plus.org/features/function-list.html

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors