• Login
Community
  • Login

Notepad++ styles

Scheduled Pinned Locked Moved General Discussion
20 Posts 5 Posters 15.9k 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.
  • A
    Alan Kilborn @David Bailey
    last edited by Mar 6, 2017, 9:16 PM

    @David-Bailey

    HAHA. No, I meant it the other way: It would be really depressing to see such a comment in code! And being bigger than normal size would just make it worse. :-)

    D 1 Reply Last reply Mar 6, 2017, 9:20 PM Reply Quote 0
    • D
      David Bailey @Alan Kilborn
      last edited by Mar 6, 2017, 9:16 PM

      @Alan-Kilborn said:

      @Claudia-Frank

      Perhaps I’m naive but doesn’t something like that violate the fixed pitch mantra of pure text editors? How would one column-select a block with that going on?

      LibreOffice can manage that trick - so why not NP++?

      David

      1 Reply Last reply Reply Quote 0
      • D
        David Bailey @Alan Kilborn
        last edited by Mar 6, 2017, 9:20 PM

        @Alan-Kilborn said:

        @David-Bailey

        HAHA. No, I meant it the other way: It would be really depressing to see such a comment in code! And being bigger than normal size would just make it worse. :-)

        Well of course, if I wrote such a plugin, I’d provide a way to turn it off!

        My idea was more that a program could show some structure rather like a DOC file. Large programs could be easier to read if they were like that.

        David

        C 1 Reply Last reply Mar 7, 2017, 3:08 PM Reply Quote 0
        • C
          Claudia Frank @Alan Kilborn
          last edited by Mar 7, 2017, 3:05 PM

          @Alan-Kilborn said:

          It would be awesome to be scrolling through some code and see a comment like "Never Ever Change This: " in that size! :-D

          Means in the future UDL version we need three types of comments.
          Line comments, block comments and hysteria comments ;-D

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • C
            Claudia Frank @David Bailey
            last edited by Mar 7, 2017, 3:08 PM

            @David-Bailey

            but unfortunately it looks as if all the styles are in use to display syntactic elements.

            don’t understand this? If you are writing your own plugin you’re free to use the styles for whatever you want. What am I missing?

            Cheers
            Claudia

            D 1 Reply Last reply Mar 7, 2017, 4:22 PM Reply Quote 0
            • D
              dail
              last edited by Mar 7, 2017, 3:17 PM

              I guess some clarification would be required.

              As @Claudia-Frank pointed out you are certainly able to write your own lexer and this would give you control over all of the styles to do whatever you want.

              My assumption (whether right or wrong) was to work with existing lexers so that for example you could have a certain comment in C++ that would trigger certain sections to get styled differently.

              Either way it is possible to do what you are wanting, just not easily.

              1 Reply Last reply Reply Quote 0
              • D
                David Bailey @Claudia Frank
                last edited by Mar 7, 2017, 4:22 PM

                .

                @Claudia-Frank said:

                @David-Bailey

                but unfortunately it looks as if all the styles are in use to display syntactic elements.
                @Claudia Frank

                don’t understand this? If you are writing your own plugin you’re free to use the styles for whatever you want. What am I missing?

                Well with only 5 styles, if I wanted to grab one to create a heading style for example with a large bold font, that would clash with the syntax colouring if it used that same style - at best a user would have to choose syntax colouring or my plugin - one or the other. I consider syntax colouring very important, so I don’t imagine I would turn on my plugin if I couldn’t use syntax colouring! . However, if there were some spare styles - 10 say, I could dedicate one for headings and not mess up the syntax colouring.

                Obviously, a heading would be part of a comment as far as syntax was concerned.

                David

                C 1 Reply Last reply Mar 7, 2017, 4:52 PM Reply Quote 0
                • C
                  Claudia Frank @David Bailey
                  last edited by Claudia Frank Mar 7, 2017, 4:53 PM Mar 7, 2017, 4:52 PM

                  @David-Bailey

                  Why do you think only 5 Styles are left?
                  Think about the 8 possible keyword groups for an UDL.
                  Each could be assigned with a different style if needed.
                  Scintilla defines the style range from 0-255. See here .

                  I assume I still have a misunderstanding.

                  Cheers
                  Claudia

                  D 1 Reply Last reply Mar 7, 2017, 11:34 PM Reply Quote 0
                  • D
                    David Bailey @Claudia Frank
                    last edited by David Bailey Mar 7, 2017, 11:35 PM Mar 7, 2017, 11:34 PM

                    @Claudia-Frank said:

                    @David-Bailey

                    Why do you think only 5 Styles are left?
                    Think about the 8 possible keyword groups for an UDL.
                    Each could be assigned with a different style if needed.
                    Scintilla defines the style range from 0-255. See here .

                    I assume I still have a misunderstanding.
                    .
                    .
                    Ah - I had simply assumed there were 5 styles available because there are only 5 styles referenced in the shortcut mapper - your information is very interesting.
                    David

                    C 1 Reply Last reply Mar 7, 2017, 11:41 PM Reply Quote 0
                    • C
                      Claudia Frank @David Bailey
                      last edited by Claudia Frank Mar 7, 2017, 11:42 PM Mar 7, 2017, 11:41 PM

                      @David-Bailey

                      Ah, I see - but those aren’t scintilla styles at all - these are indicators.
                      Might be a little bit confusing too ;-)

                      Cheers
                      Claudia

                      1 Reply Last reply Reply Quote 0
                      • D
                        David Bailey
                        last edited by David Bailey Mar 9, 2017, 9:34 PM Mar 9, 2017, 9:34 PM

                        Claudia,

                        So can you tell me what the relationship is between ‘indicators’ and Scintilla styles? What happens if I mess with Scintilla styles inside NP++?

                        However, I did notice in the Scintilla documentation that the vertical size of the characters is fixed. You can actually see that in the screen image that you posted - because you have used one large font, the rest of the text is spaced out ridiculously - so I don’t think my idea is practical - at least not to create something with headings and subheadings.

                        David

                        C 1 Reply Last reply Mar 9, 2017, 9:42 PM Reply Quote 0
                        • C
                          Claudia Frank @David Bailey
                          last edited by Mar 9, 2017, 9:42 PM

                          @David-Bailey

                          with a style you can define different attributes to each of the chars in your text.
                          Forground color, background color, which Font to use, if bold, italic etc…
                          basically what you can do if using wordpad.

                          An indicator is more like a rectangle overlaying the chars.

                          If your plugin defines the current document as a container you have the full access in regards of styling.
                          Notepad might jump in when someone defines a hyper link, therefore I would say, don’t use styles which
                          are defined by npp (I assume everything within global section of stylers.xml)

                          Cheers
                          Claudia

                          1 Reply Last reply Reply Quote 0
                          • J
                            Jim Dailey @Alan Kilborn
                            last edited by Jim Dailey Mar 10, 2017, 2:32 PM Mar 10, 2017, 2:30 PM

                            @Alan-Kilborn You could always include this (see http://patorjk.com/software/taag/#p=display&h=1&f=Small&t=Never change this!):

                             _  _                           _                             _    _     _      _ 
                            | \| | ___ __ __ ___  _ _   __ | |_   __ _  _ _   __ _  ___  | |_ | |_  (_) ___| |
                            | .` |/ -_)\ V // -_)| '_| / _|| ' \ / _` || ' \ / _` |/ -_) |  _|| ' \ | |(_-<|_|
                            |_|\_|\___| \_/ \___||_|   \__||_||_|\__,_||_||_|\__, |\___|  \__||_||_||_|/__/(_)
                                                                              |___/                            
                            

                            :-)

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