Writer: how to prevent line wrapping inside symbol?

Using LO 6.0.x under Linux Fedora 29

I’m working on a technical document explaining the use of some reserved symbols in a programming language, like ?[.

The sentence in which this 2-character symbol appears is justified such that the symbol is split as ?-Newline-[. I could of course change slightly the wording of the sentence to modify justification, but at next editing I could be caught by this spurious line wrapping again.

I tried to insert various “space” characters in range U+2000 to U+200F, in particular ZERO WIDTH SPACE, between the characters, even irrelevant (in this case) ZERO WIDTH JOINER, but I always get some visible gap in the pair.

Is there a way to inform Writer that a sequence of characters should never be split?

What I’m looking for is the exact opposite of soft hyphen. Note matter is made difficult by the fact my symbol is not composed of letters and it starts by a character usually taken as a punctuation.

Thank you all for this super fast answer!

You need WORD JOINER, which is accessible as InsertFormatting MarkNo-width no break. There’s no way to tell Writer to disallow wrap between the two characters, because their Unicode properties (what Writer consults when deciding if wrapping allowed) don’t disallow that.

You could create an autocorrect entry with the symbol, like .*?[.*?⁠[ (with the proper symbol in the middle of the replacement sequence).

You need to use U+FEFF ZERO WIDTH NO-BREAK SPACE.

This is tested with ?[ and it works also in this askbot editor for me with Firefox. The insertion in Writer is easy with the new feature: Type FEFF and with the insertion cursor at the end of the 4 Hex digit press Alt+x. The word joinner U+2060 should also do. I preferred the other solution based on the naming. The OP doesn’t want to join words (in the common sense).

Danke schön, I knew the Alt+X trick and its good for other users to remind it.

U+FEFF is deprecated in uses other than BOM, in favor of WORD JOINER (see this and this Wikipedia articles).

Thanks. I didn’t know that, and the references I recently used made no mention of it.
(Strange metamorphosis, however.)

Have you already tried? Menu Insert>Formatting Mark>Protected Space.

No because I want a “no space” (zero width)