• Login
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.
  • R
    Ruud Schmeitz
    last edited by Oct 21, 2020, 7:08 PM

    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

    A 1 Reply Last reply Oct 21, 2020, 7:20 PM Reply Quote 0
    • A
      Alan Kilborn @Ruud Schmeitz
      last edited by Oct 21, 2020, 7:20 PM

      @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.

      R 1 Reply Last reply Oct 22, 2020, 12:46 AM Reply Quote 0
      • R
        Ruud Schmeitz @Alan Kilborn
        last edited by Oct 22, 2020, 12:46 AM

        @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 .
        🙂

        A 1 Reply Last reply Oct 22, 2020, 1:40 AM Reply Quote 0
        • A
          Alan Kilborn @Ruud Schmeitz
          last edited by Oct 22, 2020, 1:40 AM

          @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.

          R 1 Reply Last reply Oct 22, 2020, 1:16 PM Reply Quote 1
          • R
            Ruud Schmeitz @Alan Kilborn
            last edited by Oct 22, 2020, 1:16 PM

            @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

            A 1 Reply Last reply Oct 22, 2020, 1:32 PM Reply Quote 0
            • A
              Alan Kilborn @Ruud Schmeitz
              last edited by Oct 22, 2020, 1:32 PM

              @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)

              R 1 Reply Last reply Oct 22, 2020, 2:05 PM Reply Quote 0
              • R
                Ruud Schmeitz @Alan Kilborn
                last edited by Oct 22, 2020, 2:05 PM

                @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 !
                😉

                A 1 Reply Last reply Oct 27, 2020, 5:34 PM Reply Quote 1
                • A
                  Alan Kilborn @Ruud Schmeitz
                  last edited by Oct 27, 2020, 5:34 PM

                  @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

                  R 2 Replies Last reply Dec 22, 2020, 8:20 PM Reply Quote 2
                  • R
                    Ruud Schmeitz @Alan Kilborn
                    last edited by Dec 22, 2020, 8:20 PM

                    @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 !

                    A 1 Reply Last reply Dec 22, 2020, 8:26 PM Reply Quote 3
                    • A
                      Alan Kilborn @Ruud Schmeitz
                      last edited by Dec 22, 2020, 8:26 PM

                      @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
                      • R
                        Ruud Schmeitz @Alan Kilborn
                        last edited by Dec 24, 2020, 3:07 AM

                        @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 .

                        A P 2 Replies Last reply Dec 24, 2020, 3:12 AM Reply Quote 0
                        • A
                          Alan Kilborn @Ruud Schmeitz
                          last edited by Dec 24, 2020, 3:12 AM

                          @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?

                          R 1 Reply Last reply Dec 24, 2020, 2:09 PM Reply Quote 0
                          • R
                            Ruud Schmeitz @Alan Kilborn
                            last edited by Dec 24, 2020, 2:09 PM

                            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
                            • P
                              PeterJones @Ruud Schmeitz
                              last edited by Dec 24, 2020, 2:09 PM

                              @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(' ')

                              R 3 Replies Last reply Dec 24, 2020, 6:48 PM Reply Quote 3
                              • R
                                Ruud Schmeitz @PeterJones
                                last edited by Dec 24, 2020, 6:48 PM

                                @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… .

                                P EkopalypseE 2 Replies Last reply Dec 24, 2020, 7:11 PM Reply Quote 1
                                • P
                                  PeterJones @Ruud Schmeitz
                                  last edited by Dec 24, 2020, 7:11 PM

                                  @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 Dec 25, 2020, 12:11 PM

                                    @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.

                                    R 1 Reply Last reply Dec 25, 2020, 4:17 PM Reply Quote 1
                                    • R
                                      Ruud Schmeitz @Ekopalypse
                                      last edited by Dec 25, 2020, 4:17 PM

                                      @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 Dec 25, 2020, 4:21 PM Reply Quote 1
                                      • EkopalypseE
                                        Ekopalypse @Ruud Schmeitz
                                        last edited by Dec 25, 2020, 4:21 PM

                                        @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 Dec 25, 2020, 4:31 PM

                                          @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?

                                          R 1 Reply Last reply Dec 25, 2020, 5:30 PM Reply Quote 1
                                          • First post
                                            Last post
                                          The Community of users of the Notepad++ text editor.
                                          Powered by NodeBB | Contributors