Community
    • Login

    Selected text

    Scheduled Pinned Locked Moved General Discussion
    32 Posts 4 Posters 2.3k 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.
    • Ruud SchmeitzR
      Ruud Schmeitz
      last edited by

      Another question about Selected text .

      I found out yesterday how to make it look like this :

      selected text - Np++.png

      Is there a way to make it look like this Delphi editor version :
      selected text - Delphi.png

      Thanx

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Ruud Schmeitz
        last edited by

        @RuudSchmeitz

        Presume that you mean that “it’s all blue” in the Delphi version?
        I don’t believe so.

        But isn’t the Notepad++ version superior?
        I mean, it only shows where there are actual characters.

        Ruud SchmeitzR 1 Reply Last reply Reply Quote 0
        • Ruud SchmeitzR
          Ruud Schmeitz @Alan Kilborn
          last edited by

          @Alan-Kilborn

          I think the all blue Delphi version is more relaxing to the eye .

          And about seeing the actual characters , well , I wrote the code myself , so I know what the actual characters are .
          🙂

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Ruud Schmeitz
            last edited by

            @RuudSchmeitz said in Selected text:

            so I know what the actual characters are .

            Ever heard of embedded tab characters, or trailing spaces?
            Both undesirable, and both usually unseen.

            Ruud SchmeitzR 1 Reply Last reply Reply Quote 1
            • Ruud SchmeitzR
              Ruud Schmeitz @Alan Kilborn
              last edited by

              @Alan-Kilborn said in Selected text:

              Ever heard of embedded tab characters, or trailing spaces?
              Both undesirable, and both usually unseen.

              I don’t use tabs , and spaces are visible as dots .

              See my Notepad++ settings at :
              https://community.notepad-plus-plus.org/topic/20191/bug-in-python-script

              Alan KilbornA 1 Reply Last reply Reply Quote 0
              • Alan KilbornA
                Alan Kilborn @Ruud Schmeitz
                last edited by

                @RuudSchmeitz said in Selected text:

                I don’t use tabs

                Smart. :-)
                (Although if Notepad++ could to “tab indent space align” behavior, I would be all in favor of tab chars)

                and spaces are visible as dots

                Yes, in Notepad++
                (You were praising the Delphi view, but I don’t see any visible space mechanism there – I guess you were just praising the calming blueness of the selection)

                Ruud SchmeitzR 1 Reply Last reply Reply Quote 0
                • Ruud SchmeitzR
                  Ruud Schmeitz @Alan Kilborn
                  last edited by

                  @Alan-Kilborn said in Selected text:

                  @RuudSchmeitz said in Selected text:

                  Yes, in Notepad++
                  (You were praising the Delphi view, but I don’t see any visible space mechanism there – I guess you were just praising the calming blueness of the selection)

                  Exactly !
                  😉

                  Alan KilbornA 1 Reply Last reply Reply Quote 1
                  • Alan KilbornA
                    Alan Kilborn @Ruud Schmeitz
                    last edited by

                    @RuudSchmeitz

                    I just discovered that this bit of Pythonscript magic seems to do what you want for the selection:

                    editor.setSelEOLFilled(True)

                    Sample:

                    e5eecbfc-d5fa-4a9b-893b-429435233f54-image.png

                    Same sample before applying:

                    06365f54-abf4-4c21-a0d2-dce7d7be40ea-image.png

                    Ruud SchmeitzR 2 Replies Last reply Reply Quote 2
                    • Ruud SchmeitzR
                      Ruud Schmeitz @Alan Kilborn
                      last edited by

                      @Alan-Kilborn said in Selected text:

                      @RuudSchmeitz

                      I just discovered that this bit of Pythonscript magic seems to do what you want for the selection:

                      editor.setSelEOLFilled(True)

                      I’m sorry for the late response : I only saw your 27-Oct-response today .

                      I added the line editor.setSelEOLFilled(True) at the end of the startup.py file , and it works perfectly !

                      Thanks Alan !

                      Alan KilbornA 1 Reply Last reply Reply Quote 3
                      • Alan KilbornA
                        Alan Kilborn @Ruud Schmeitz
                        last edited by

                        @RuudSchmeitz

                        Actually, I’ve been using it for a while now, and I tend to like it as well!

                        1 Reply Last reply Reply Quote 1
                        • Ruud SchmeitzR
                          Ruud Schmeitz @Alan Kilborn
                          last edited by

                          @Alan-Kilborn said in Selected text:

                          @RuudSchmeitz

                          I just discovered that this bit of Pythonscript magic seems to do what you want for the selection:

                          editor.setSelEOLFilled(True)

                          One last question : where did you find the Pythonscript ?
                          I’m looking for a way to change the ‘White space symbol’ . Perhaps there already is a Pythonscript to do this .

                          Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
                          • Alan KilbornA
                            Alan Kilborn @Ruud Schmeitz
                            last edited by

                            @Ruud-Schmeitz said in Selected text:

                            where did you find the Pythonscript ?

                            Not sure I understand the question, exactly.
                            It isn’t much of a script, it is just a one-liner that mimics the Scintilla command SCI_SETSELEOLFILLED.
                            If you can elaborate more on what you mean, I’ll certainly try to answer…

                            I’m looking for a way to change the ‘White space symbol’

                            I don’t think you reasonably can do this.
                            What’s wrong with the existing one?
                            What would you change it to?

                            Ruud SchmeitzR 1 Reply Last reply Reply Quote 0
                            • Ruud SchmeitzR
                              Ruud Schmeitz @Alan Kilborn
                              last edited by

                              Not sure I understand the question, exactly.
                              It isn’t much of a script, it is just a one-liner that mimics the Scintilla command SCI_SETSELEOLFILLED.
                              If you can elaborate more on what you mean, I’ll certainly try to answer…

                              I clicked on the link , and the Scintilla-page sort of answers my question .
                              This is new to me . Are all those Scintilla-commands available for Notepad++ ?

                              I don’t think you reasonably can do this.
                              What’s wrong with the existing one?
                              What would you change it to?

                              The dots in the middle of the space-character can be a bit confusing . Changing the color of the White space symbols is not always enough .
                              I would rather have (a small version of) the underscore as White space symbol .

                              1 Reply Last reply Reply Quote 0
                              • PeterJonesP
                                PeterJones @Ruud Schmeitz
                                last edited by

                                @Ruud-Schmeitz,

                                where did you find the Pythonscript

                                All the PythonScript commands are found in the Plugins > Python Script > Context-Help which is bundled with the PythonScript plugin; that menu command opens a local set of HTML files in your default web browser; in the table of contents on the left, the Notepad++ Object and Editor Object pages will be the ones you use for finding out what goes with notepad.* and editor.*

                                I’m looking for a way to change the ‘White space symbol’

                                As far as I can tell, it’s not a “symbol”, per se. SCI_WHITESPACESIZE calls them “dots”. The size is 0 for invisible, or 2 when you turn on viewing whitespace. But when you change the size, using the PythonScript editor.setWhitespaceSize(size) command, you see that it’s likely not a symbol/character; it appears that PythonScript is drawing a size ✕ size square – and if you set size bigger than about half the font height, the “dots” start blending together.

                                So if your goal in changing the “symbol” is to make them slightly bigger, you can just use editor.setWhitespaceSize(size) to change the dimensions of the “dot”.

                                Otherwise, you can use SCI_SETREPRESENTATION through editor.setRepresentation(' ', 'SP'), and it will change the visual display of the space character to SP in a black box. Change the 'SP' to a string containing whatever black-boxed character(s) you’d like to see. (This is technically not part of the view-whitespace setting; however, it accomplishes the goal of changing what you see instead of the dot.) If you want to undo this change, use editor.clearRepresentation(' ')

                                Ruud SchmeitzR 3 Replies Last reply Reply Quote 3
                                • Ruud SchmeitzR
                                  Ruud Schmeitz @PeterJones
                                  last edited by

                                  @PeterJones said in Selected text:

                                  All the PythonScript commands are found in the Plugins > Python Script > Context-Help which is bundled with the PythonScript plugin; that menu command opens a local set of HTML files in your default web browser; in the table of contents on the left, the Notepad++ Object and Editor Object pages will be the ones you use for finding out what goes with notepad.* and editor.*

                                  I tried your suggestion , Peter :
                                  Plugins > Python Script > Context-Help

                                  but instead of the PythonScript commands , I got this error-message :
                                  Error - Cannot open file.png

                                  Despite the error-message , the folder does exist !

                                  So I double-clicked on file index.html in folder :
                                  C:\Program Files\Notepad++\plugins\PythonScript\doc
                                  and got the information you described .

                                  I’m not sure what caused the error . It could be the space in C:\Program Files… .

                                  PeterJonesP EkopalypseE 2 Replies Last reply Reply Quote 1
                                  • PeterJonesP
                                    PeterJones @Ruud Schmeitz
                                    last edited by

                                    @Ruud-Schmeitz ,

                                    It looks like it’s building the path incorrectly, with the c:\program files\notepad++\ portion twice in the path, which isn’t going to work.

                                    You might want to go to the PythonScript repo and report that as a minor issue.

                                    1 Reply Last reply Reply Quote 2
                                    • EkopalypseE
                                      Ekopalypse @Ruud Schmeitz
                                      last edited by

                                      @Ruud-Schmeitz

                                      May ask you how you installed PythonScript plugin and which
                                      version you are using (either use about from the menu or the
                                      output from the console)?
                                      I remember seeing this strange path in an older version of PS,
                                      but should be fixed already.

                                      Ruud SchmeitzR 1 Reply Last reply Reply Quote 1
                                      • Ruud SchmeitzR
                                        Ruud Schmeitz @Ekopalypse
                                        last edited by

                                        @Ekopalypse said in Selected text:

                                        @Ruud-Schmeitz

                                        May ask you how you installed PythonScript plugin and which
                                        version you are using (either use about from the menu or the
                                        output from the console)?
                                        I remember seeing this strange path in an older version of PS,
                                        but should be fixed already.

                                        This is how I installed Python Script :
                                        • start Notepad++
                                        • in menubar , click on Plugins
                                        • in list , click on Plugins Admin…
                                        • in list , select PythonScript
                                        • click on Install

                                        and this is the version I’m using :
                                        Python Script version.png

                                        EkopalypseE 2 Replies Last reply Reply Quote 1
                                        • EkopalypseE
                                          Ekopalypse @Ruud Schmeitz
                                          last edited by

                                          @Ruud-Schmeitz

                                          Thanks, yes, that is the latest stable version.
                                          Hmm strange - I’ll have to do some tests.

                                          1 Reply Last reply Reply Quote 1
                                          • EkopalypseE
                                            Ekopalypse @Ruud Schmeitz
                                            last edited by

                                            @Ruud-Schmeitz

                                            Seems to work for me.
                                            Can you do me another favor and post your debug-info
                                            which is available from the last menu entry, the ? menu?

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