Community
    • Login

    Show no-break space

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    9 Posts 8 Posters 45.7k Views 5 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.
    • PohliP Offline
      Pohli
      last edited by

      Hello,

      is there any way to show no-break spaces (U+00A0)?

      Claudia FrankC 1 Reply Last reply Reply Quote 1
      • Claudia FrankC Offline
        Claudia Frank @Pohli
        last edited by

        @Pohli

        anything within View->Show Symbols?

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 1
        • guy038G Offline
          guy038
          last edited by guy038

          Hi, Pohli,

          The NO-BREAK SPACE character ( of Unicode code-point 00A0 ) is just displayed as the usual SPACE character and, unfortunately, cannot be visualized, with a specific glyph, when using the option View > Show Symbol

          To see the interest of the the NO-BREAK SPACE :

          • Choose the option View > Show Symbol > Show all characters

          • Choose the option View > Word wrap

          • Type any text, which continues on the next line

          • Now, select the last SPACE character ( very small orange dot ! )

          • Replace it by a NO-BREAK SPACE ( ALT + 0,1,6,0 on the Numeric keypad )

          => Immediately, the last word, of the first line, is moved at beginning of the second one. Logical, as the two words, before and after the NO-BREAK SPACE character, are, from now on, considered as a single orthographic entity !

          Of course, for searching any NO-BREAK SPACE, just type \xa0, in the Find dialog.

          But a nice and easy way to visualize all the NO-BREAK SPACE characters, of a text, would be to select one of them and, then, use the menu option Search > Mark All > Using 1st style to Using 5th style. ( I specially like the default colour of the fourth style ! )

          Best Regards,

          guy038

          PohliP 1 Reply Last reply Reply Quote 4
          • PohliP Offline
            Pohli @guy038
            last edited by Pohli

            @guy038 said:

            Of course, for searching any NO-BREAK SPACE, just type \xa0, in the Find dialog.

            But a nice and easy way to visualize all the NO-BREAK SPACE characters, of a text, would be to select one of them and, then, use the menu option Search > Mark All > Using 1st style to Using 5th style. ( I specially like the default colour of the fourth style ! )

            That’s a good workaround for me, thanks alot!

            Best regards,

            Pohli

            1 Reply Last reply Reply Quote 0
            • PeterJonesP Offline
              PeterJones
              last edited by

              If you have PythonScript plugin installed (assuming UTF-8 or UTF-8-BOM encoding), go to the console and type:

              editor.setRepresentation("\xC2\xA0"," NBSP ")
              

              in the >>> line, and hit RUN. To undo,

              editor.clearRepresentation("\xC2\xA0")
              

              If anyone knows how to escape characters in the NPP_EXEC command line, the same could be done with it’s SCI_SENDMSG. Actually, what will happen if I copy/paste a true NBSP between the first set of quotes?

              SCI_SENDMSG 2665 " " "NBSP"
              SCI_SENDMSG 2667 " "
              

              It works! (I won’t guarantee that the forum keeps the blank between the spaces as an NBSP; if not, you can type it like guy038 suggested)

              (SCI_SETREPRESENTATION is 2665; SCI_CLEARREPRESENTATION is 2667; see here)

              So, you can change the representation with either NPP Exec or PythonScript plugin.

              1 Reply Last reply Reply Quote 4
              • ThePirate42T Offline
                ThePirate42
                last edited by

                For convenience this is a NppExec script to toggle the alternative representation method of NBSPs suggested by PeterJones:

                sci_sendmsg SCI_GETREPRESENTATION " " @""
                if "$(MSG_LPARAM)" == "" then
                  sci_sendmsg SCI_SETREPRESENTATION " " "NBSP"
                else
                  sci_sendmsg SCI_CLEARREPRESENTATION " "
                endif
                npp_setfocus sci
                

                Remember to change all the spaces inside the

                " "
                

                parts into actual NBSPs, since the forum converts them in normal spaces.

                Alan KilbornA 1 Reply Last reply Reply Quote 0
                • Alan KilbornA Offline
                  Alan Kilborn @ThePirate42
                  last edited by

                  For those interested, there’s a PythonScript way of doing this sort of thing, HERE.

                  1 Reply Last reply Reply Quote 1
                  • Laurie StearnL Offline
                    Laurie Stearn
                    last edited by Laurie Stearn

                    Just a heads up for recent N++ users, search for the text no-break space in Windows Character Map, select it at top left and copy/paste into a UTF encoded N++ window with Word wrap and View>Show Non-Printing Characters ticked, it shows up as NBSP highlighted.
                    Or, the character is pasted here on the next line:
                     
                    Works at least in the unposted forum edit box - but not in the preview pane it seems.

                    Septimus BobS 1 Reply Last reply Reply Quote 0
                    • Septimus BobS Offline
                      Septimus Bob @Laurie Stearn
                      last edited by Septimus Bob

                      nice, it really hepled me, thank you again)

                      1 Reply Last reply Reply Quote 0

                      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