Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using listchars to show leading whitespace in Vim [duplicate]

Tags:

vim

whitespace

I use spaces over tabs. In Sublime Text 2, I would have leading spaces show like so:

leading spaces

I have my .vimrc setup to show tabs, line endings, etc. But I'm not sure how to replicate what I have in Sublime. It was handy as I could still see indentation much more easily when just using spaces.

Here's my line for it now:

set listchars=eol:¬,tab:→→,extends:>,precedes:<
like image 726
agmcleod Avatar asked Feb 15 '23 01:02

agmcleod


1 Answers

The list+listchars combo can show trailing spaces but not leading spaces.

You could try vim-indent-guide.

like image 50
romainl Avatar answered Mar 08 '23 16:03

romainl