tags:

views:

204

answers:

4

In my .gvimrc I have following lines:

set listchars=tab:\.\ ,trail:-
set softtabstop=2
set shiftwidth=2
set tabstop=2
set expandtab

When I change last line to set noexpandtab the indents can be seen and marked with .

Is there a way to make vim treat expanded tabs like "normal" tab so that list option works as expected?

+1  A: 

The list option does work as expected. It displays tab characters according to the tab setting of 'listchars'. It sounds like you're conflating "tab" with "indentation level". No, 'list' isn't designed to distinctly mark the different indentation levels.

jamessan
+1  A: 

You can not see them because tabs are converted to spaces. You can convert spaces to tabs by issuing :retab!

Tassos
+1  A: 

As far as I can see you would like to highlight indentation. It's possible using match highlighting. Please, take a look at my answer to the question about indentation guides emulation.

ib
+1  A: 

The standard vim options involving those characters will not do the trick with expandtab set. You will either have to deal with not marking expanded tabs, use real tabs, or do some hacking!

Cody Frazer