Search code examples
jsonvimdatasetbuffer

Vim editor showing some blue characters but cannot reach it


I was editing some data and when I checked the json file it's showing some blue chars like "<202b>202>" and "b>". I can see them through the vim but I can not change them or even find them. screenshot of vim

When I print the texts in python, also python doesn't see them and just printing the normal texts. Are those chars important? How can I get rid of them? Thank you.


Solution

  • <202b> is how Vim represents the character U+202B, the presence of which kind of makes sense because your data appears to be a mix of left-to-right and right-to-left scripts.

    You can't search it with /<202b> because the characters <202b> are not actually in the text, it is just how Vim displays the character U+202B when it encounters it.

    You can:

    • insert that character with <C-v>u202b, see :help i_ctrl-v_digit,
    • search for it with /\%u202b, see :help /\%u.

    example

    As for getting rid of them… it depends on whether they are here accidentally or purposely.