In my pursuit to migrate from Vim to Emacs, I have stumbled on yet another roadblock.
When working with files that contain special whitespace characters, Vim/Neovim would automatically highlight these. This saved me a lot of time during debugging or data analysis, and is a functionality that I struggled to get to work on more modern IDEs.
However, this does not work out-of-the-box neither on vanilla Emacs nor Doom Emacs. I am unable to find any working solutions online. I assumed whitespace-mode
would have handled this, but it is not the case.
It would be really helpful if the community here can help solve my problem as I deal with such characters on a daily basis. Until then, I have to pause my pursuit and stick with the trusty Neovim.
U+200B in Neovim
Notice Neovim highlighting the character as <200B>
.
U+200B in Doom Emacs
Notice the think cursor between "hello" and "world".
Thanks to the suggestion by @nmtake@lemm.ee, glyphless-display-mode
allows me to view the characters. But it still doesn't play well with vim motions on Emacs.
Here is a demonstration, and below are the keystrokes.
C-v
to enable VISUAL-BLOCK
mode.
9j
to select all 9 occurrences.
d
to delete the selection.
The above vim-motion works on Neovim but not on Emacs with evil-mode.
If anyone wants to try out here is the text I am playing with:
hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world
Thanks for sharing your experience.
Also, appreciate the intro to Haiku OS, I had not heard of it earlier. It is interesting to read their philosophy through their FAQs.
https://www.haiku-os.org/about/faq/