Semi-space in NP++
-
@Terry-R said in Semi-space in NP++:
I initially was going to ask the OP how he got the characters he did by using Shift+Space(bar) as I just get a normal space (x20).
That’s a good point. I’d be willing to bet that OP didn’t get that with a Shift+Space press; he just thinks he did.
-
@mkupper said in Semi-space in NP++:
I don’t think this forum supports table formatted data
It does! (At least, simple tabling)
-
@Terry-R I’m guessing the person has a keyboard shortcut as I too get a normal \x20 space when I use shift-space.
@JamesWebb Notepad++ normally does nothing special when people use Shift-Spacebar. Let’s see how your copy of Notepad++ is configured.
- In Notepad++ go to Settings / Shortcut mapper
- Enter
spacebar
(type out the letters s-p-a-c-e-b-a-r) in the filter box at the bottom. - Now flip through the tabs at the top from Main menu, Macros, Run command, etc.
On my copy of Notepad++ only three shortcuts use
spacebar
as part of their definition. For example, Main menu tab has Ctrl+Shift+Spacebar assigned to Function Parameters Hint.Do you have a shortcut for Shift-Spacebar listed in any of the tabs? If so, we can investigate that further while also figuring out what a “semi-space” is and then adding a new shortcut that will generate a semi-space using whatever keystroke you want using the same method that your copy of Notepad++ uses to support Shift-Spacebar.
If you did not find any Notepad++ shortcuts besides the normal ones that ship with Notepad++ then it’s likely you have a Windows add-on or setting of some sort that handles shift-spacebar. I would confirm that by putting a shift-space in a test file using plain Notepad (not Notepad++) and then seeing what’s in the test file.
-
@Alan-Kilborn said in Semi-space in NP++:
@mkupper said in Semi-space in NP++:
I don’t think this forum supports table formatted data
It does! (At least, simple tabling)
I had looked at https://spec.commonmark.org/0.30/ and tried
<table>
<tr><th>header1</th><th>header2</th></tr>
<tr><td>row 1 col 1</td><td>row 1 col 2</td></tr>
<tr><td>row 2 col 1</td><td>row 2 col 2</td></tr>
</table>It seems well formed but I’m only seeing the raw HTML in the preview pane.
-
@Alan-Kilborn said in Semi-space in NP++:
I’d be willing to bet that OP didn’t get that with a Shift+Space press; he just thinks he did.
There are keyboard layouts (reference) which generate a Zero Width Non-Joiner from Shift+space.
-
@mkupper :
At least, simple tabling
| Tables | Are | Cool | | ------------- |:-------------:| -----:| | col 3 is | right-aligned | $1600 | | col 2 is | centered | $12 | | zebra stripes | are neat | $1 |
produces:
Tables Are Cool col 3 is right-aligned $1600 col 2 is centered $12 zebra stripes are neat $1 -
@Alan-Kilborn
This is such a nice, compact example of how to make Markdown tables that I think it might make sense for @PeterJones to add it to the Formatting Forum Posts FAQ.Of course, I understand that that FAQ isn’t really meant to be a comprehensive guide to Markdown, and therefore it might make sense to omit it for the sake of conciseness.
-
I think what the OP got is this: , a Zero Width Non-Joiner (‌). And this matches what @Coises has mentioned here.
@JamesWebb: These black-boxed items show characters that are invisible otherwise if you have “Show All Characters” ( ) checked in the toolbar. Do not confuse this with the literal text “ZWNJ”.
-
I want to clarify that when I mentioned the need for spacing in Persian language, I was not referring to em/en space. In Persian, which is a right-to-left (RTL) language, we use semi-space to indicate that two words are closer to each other than a normal space (Spacebar) would suggest, yet they do not touch each other. This is not an issue when using MS Notepad or Office Word.
I have a screenshot and a screen recording of the issue that occurs when I press Shift+Space. Unfortunately, I cannot share the link due to my zero reputation.
The SS link (just replace “[dot]” with “.” ):
ibb[dot]co/X4H3qPG -
According to this issue on the Windows user forum, as well as this issue with another open source editor, the expected behaviour of the Persian IME keyboard is to insert a
ZWNJ
character whenShift+Space
orShift+B
are pressed. The title of the Windows issue refers to “‘half-space’ or ZWNJ”, so they are actually the same thing.Notepad++ is correctly receiving a
ZWNJ
as input from the keyboard. It was decided in version 8.5.3 to display boxed annotations of non-printing Unicode characters by default — which admittedly favours writers of source code, who need to be aware of every character in the file. MS Word doesn’t do this by default since it’s more attuned to presenting documents as they will look on paper.If you don’t want to see the annotations, go to the
View
menu, then theShow Symbol
submenu, and make sure thatShow Non-Printing Characters
does not have a check mark, as suggested already. -
@ rdipardo
It was decided in version 8.5.3 to display boxed annotations of non-printing Unicode characters by default
Yes! I didn’t have it before, it appears in recent (NP++) updates.
Thanks. It worked. -
@Mark-Olson said in Semi-space in NP++:
I think it might make sense for @PeterJones to add it to the Formatting Forum Posts FAQ.
Sorry, I guess since I used that table-technique throughout the FAQ, and even posted screenshots of source code which produces such a table, and posted links to other Markdown resources, it hadn’t struck me that I’d never mentioned there was, in fact, a table syntax. But I suppose I could add an explicit mention.
—
Update: Done. I have added “Tables” to the FAQ. -
Hello, @jameswebb, @alan-kilborn, @mkupper, @terry-r, @Coises, @mark-olson, @gerdb42, @rdipardo and All,
May be, I did not understand all that topic very clearly but, to my mind, it seems easy to bound the
ZWNJ
character to theShift + Spacebar
shortcut !You just have to create a new macro :
So :
-
Start Notepad++ and click on the
¶
button of theToolBar
-
Open your active
shortcuts.xml
file within N++ -
Right before the
</macros>
line, insert this new macro :
<Macro name="ZWNJ (Semi Space)" Ctrl="no" Alt="no" Shift="yes" Key="32"> <Action type="1" message="2170" wParam="0" lParam="0" sParam="" /> </Macro>
Note : Although not visible, there is a
ZWNJ
character between the two double-quotes desParam
!-
Save the modifications of the
shortcut.xml
file (Ctrl + S
) -
Close the
shortcut.xml
file (Ctrl + W
) -
Exit N++ (
Alt + F4
) -
Restart N++
Here you are ! Now, each time you use the
Shift + Spacebar
shortcut, it will insert azero Width Non Joiner
character, at caret location, even if theCaps Lock
key is set ;-))Best Regards,
guy038
-
-
@ guy038
You just have to create a new macro
Thank you for providing the macro. The solution was already present, but I wasn’t aware of it.
View menu>Show Symbol submenu> turn off Show Non-Printing Characters