Remove Vim Tab Characters

waylonwalker

Waylon Walker

Posted on January 6, 2022

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

💖 💪 🙅 🚩
waylonwalker
Waylon Walker

Posted on January 6, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Remove Vim Tab Characters
vim Remove Vim Tab Characters

January 6, 2022

Serve html from your command line
vim Serve html from your command line

December 28, 2021