[vim/vim] zero width non-joiner (ZWNJ) renders as its Unicode codepoint <200c> (#7932)

78 views
Skip to first unread message

Farid Cheraghi

unread,
Mar 4, 2021, 3:09:43 PM3/4/21
to vim/vim, Subscribed

This problem is already reported here but the conceal solution has side effects and is not desired. The Gnome terminal with BiDi support renders ZWNJ correctly but when I run Vim inside Gnome terminal, it shows ZWNJ as <200c> using the same font; I use Vazir font in the screenshots but the same happens with the ubiquitous Liberation Mono font.

The word فارس‌ی in Gnome Terminal:

image

The same word in Vim run inside Gnome Terminal:
image

To reproduce type or copy/paste the word س‌ی (a ZWNJ resides between the letter س and ی) in both the Gnome terminal (or any libvte based terminal with BiDi support) and Vim.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

MSKF

unread,
Apr 13, 2022, 7:37:19 AM4/13/22
to vim/vim, Subscribed

I can reproduce that.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/1097946091@github.com>

Christian Brabandt

unread,
Jun 10, 2024, 2:39:37 PM6/10/24
to vim/vim, Subscribed

Closed #7932 as not planned.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/7932/issue_event/13105974557@github.com>

Christian Brabandt

unread,
Jun 10, 2024, 2:39:40 PM6/10/24
to vim/vim, Subscribed

duplicate of #204


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/2159047966@github.com>

avidseeker

unread,
Jul 16, 2024, 9:41:54 AM7/16/24
to vim/vim, Subscribed

I don't think it's a duplicate. Support for special Unicode character is a different issue from Bidi rendering, despite some overlap (It's better to divide a big topic like bidi into smaller problems anyways). I'd prefer to keep the discussion here to avoid hijacking the original issue.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/2230926006@github.com>

avidseeker

unread,
Jul 16, 2024, 9:44:52 AM7/16/24
to vim/vim, Subscribed

I think there is a solution that is a middle ground. Not complete conceal and not conceal that replaces with whitespace either.

I just noticed this behavior while editing a Vim help file (syntax.txt): Lines such as:

TEX				*tex.vim* *ft-tex-syntax* *latex-syntax*

have conceal for asterisks * that are not shown unless in Visual or Insert mode.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/2230932732@github.com>

Christian Brabandt

unread,
Jul 16, 2024, 9:59:14 AM7/16/24
to vim/vim, Subscribed

That is concealing


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/2230963888@github.com>

avidseeker

unread,
Jul 16, 2024, 10:17:20 AM7/16/24
to vim/vim, Subscribed

It is a stronger type of concealing I just realized is possible in Vim. The conceal I'm used to, at least in LaTeX and Markdown, is that characters are unconcealed as soon as the cursor is in the same line with them. This is not the case with help filetype. They are unconcealed only in Visual and Insert modes, and they're not replaced with whitespace characters.

Would it be possible to ship a solution like the one you provided: https://vi.stackexchange.com/questions/17900 to be the default with Vim? Perhaps toggle-able behind a command similar to :list. ZWNJ is not the only Unicode control character. There are dozens more: https://en.wikipedia.org/wiki/Category:Control_characters


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/2231020721@github.com>

avidseeker

unread,
Jul 16, 2024, 11:39:00 AM7/16/24
to vim/vim, Subscribed

@faridcher you mentioned that "conceal solution has side effects and is not desired". Can you clarify what these unintended side effects are?


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/2231256563@github.com>

Farid Cheraghi

unread,
Jul 18, 2024, 3:22:14 PM7/18/24
to vim/vim, Subscribed

@avidseeker it hides certain markups. This is of paramount importance while editing plain text dominant files like TeX (as opposed to a programming language). Imagine you had to toggle conceal mode to properly see character "a" in English. The ZWNJ in plain text (conceal=0) is great both for editing as well as reading.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/2237364152@github.com>

avidseeker

unread,
Jul 18, 2024, 9:07:53 PM7/18/24
to vim/vim, Subscribed

Conceal hides markup? Can you give an example .tex document?

I think Vim should already have a selective conceal where is hidden but markup is not.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/7932/2237831950@github.com>

Reply all
Reply to author
Forward
0 new messages