Vim - How Recognize Spaces as Tabs (set listchars=tab)

Posted by Eduardo Lucio on Super User See other posts from Super User or by Eduardo Lucio
Published on 2014-08-25T15:07:17Z Indexed on 2014/08/25 16:22 UTC
Read the original article Hit count: 249

Filed under:
|
|
|
|

I wonder if it is possible to use a configuration for that command "set listchars=tab:¦¦,trail:·" to "see" 4 spaces as tabs and get the effect of the picture below (using real tabs)...

enter image description here

I use the setting "set expandtab" to Vim use spaces in place of tabs. I really need to use spaces instead of tabs, but I would keep the functionality above. There is some form of do this?


Here's how Vim behaves when I use "set expandtab"...

enter image description here

... I wish he recognized one tab for every 4 spaces like above!


My setup for tabs...

set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab

Thank you!

© Super User or respective owner

Related posts about vim

Related posts about gvim