micro icon indicating copy to clipboard operation
micro copied to clipboard

Show invisibles (whitespaces, tabs, newlines...)

Open khoden opened this issue 9 years ago • 10 comments

Would you add feature/option to show whitespaces?

Spaces as small dots, tabs as arrows

khoden avatar Oct 26 '16 02:10 khoden

And LF, CR, CR+LF as paragraph mark

mikamiel avatar Oct 26 '16 06:10 mikamiel

This would would be an extension of the indentchar setting. I think it's probably best to implement the way Vim does with listchars with a list of all the different special characters.

zyedidia avatar Oct 26 '16 14:10 zyedidia

And please display undisplayable Unicode characters in a hexadecimal format - it happens so often that micro puts some escape sequences into files for whatever reason (probably related to #779), but without that feature it's impossible to debug that without starting vim or basically any other editor.

moqmar avatar Apr 19 '18 06:04 moqmar

Up, is there a way in 2022 to show the hidden characters ? Like vim's listchars ?

Julien00859 avatar Jan 30 '22 17:01 Julien00859

to show tabs use "indentchar": "."

serge-v avatar Jan 30 '22 18:01 serge-v

This thread is at the top of search results, so I just wanted to point out that you can use any kind of unicode character for indentchar so that it looks a little more like the functionality seen in other text editors like Sublime text.

Rather than just a dot, you can choose from a wide variety of styled arrows for example. The most appropriate behavior would be if these stretched out or duplicated over the number of columns set by your tab stop. Sadly that isn't the case, and the indentchar is typically only one column wide. But as an additional workaround, there are some unicode symbols that are interpreted by some terminals as two columns wide rather than just one thanks the the East Asian width property.

The rightward tab character renders well for me as two columns and is likely the most appropriate choice. Set it with: set indentchar ⇥

You might also prefer in the "Long arrows" category, though oddly enough most of the "long arrows" don't render as two columns (at least for me).

kcghost avatar May 02 '22 15:05 kcghost

yes, this does still come up when searching .. and reading thru it seems you can NOT have different non-white for different white characters, yes?

czrpb avatar May 17 '22 18:05 czrpb

I'd just love to see whitespaces on end of line so I can remove them.

Justinzobel avatar Jan 30 '23 08:01 Justinzobel

Not exactly this but similar (and arguably better) functionality is provided by my PR #1897.

dmaluka avatar Jan 30 '23 19:01 dmaluka