Hacker News new | ask | show | jobs
by plesn 2992 days ago
How do I see those invisible characters in emacs or vim ? In emacs I thought that whitespace-mode would do the trick but apparently it doesn't.
3 comments

vim (7.4) seems to display them by default. With my whole vimrc commented out (just to be sure it wasn't a setting I changed), I get this:

    F<200b>or exam<200b>ple, I’ve ins<200b>erted 10 ze<200b>ro-width spa<200b>ces in<200b>to thi<200b>s sentence, c<200b>an you tel<200b><200b>l?
(The <200b> is also highlighted a different color than the rest of the text, and acts like a single character when moving the cursor through it. It's really, really obvious.)
Indeed, I copy-pasted in emacs but not in vim, my bad...
In emacs those characters are by default visible as one-pixel wide spaces, to make them more apparent eval (update-glyphless-char-display 'glyphless-char-display-control '((format-control . empty-box) (no-font . hex-code))).
To view it, I used:

    echo "Ctrl+V" | hd
Which makes a hexdump. Easily visible there.

If you're looking for Vim or Emacs specifically, I don't know.