DEV Community

Cover image for Remove Vim Tab Characters
Waylon Walker
Waylon Walker

Posted on • Originally published at waylonwalker.com

Remove Vim Tab Characters

I've been stuck many times looking at a vim buffer with little question marks at the beginning of each line and trying to get rid of them. for so long I didn't know what they were so trying to get rid of them was impossible.

example of what the tab character renders as in my editor

It turns out they are tabs, and you can get rid of the little leading question marks with this substitution command.

:%s/\t/    /g
Enter fullscreen mode Exit fullscreen mode

This is a til (today I learned) I'm posting them on my website and to twitter's #100daysoftils

Discussion (0)