Quantcast

Nice display of leading tabs

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Nice display of leading tabs

statquant2
Hi all,
browsing for a nice theme I found this http://leetless.de/vim.html, I am intersted to understand how you can have this nice display of indentation you can see on any theme of the page.
I browsed the guy .vimrc file but I can't make it work.

Do somebody have some insight ?

Cheers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

H Xu
I also want to know.

On 11/2/10, statquant2 <[hidden email]> wrote:

>
> Hi all,
> browsing for a nice theme I found this http://leetless.de/vim.html, I am
> intersted to understand how you can have this nice display of indentation
> you can see on any theme of the page.
> I browsed the guy .vimrc file but I can't make it work.
>
> Do somebody have some insight ?
>
> Cheers
> --
> View this message in context:
> http://vim.1045645.n5.nabble.com/Nice-display-of-leading-tabs-tp3245279p3245279.html
> Sent from the Vim - General mailing list archive at Nabble.com.
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

Adam-281
In reply to this post by statquant2
On Mon, Nov 1, 2010 at 11:26, statquant2 <[hidden email]> wrote:

Hi all,
browsing for a nice theme I found this http://leetless.de/vim.html, I am
intersted to understand how you can have this nice display of indentation
you can see on any theme of the page.
I browsed the guy .vimrc file but I can't make it work.

Do somebody have some insight ?

You can change how tabs are displayed using the listchars field (http://vim.wikia.com/wiki/Highlight_unwanted_spaces#Using_the_list_and_listchars_options)
 
So I believe this is how his specific layout is done (don't have vim atm so I can't test - might have to escape the pipe)
 
:set listchars=tab:|-

--
~Adam~

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

Andrei Kulakov
In reply to this post by statquant2
On 11/01/2010 12:26 PM, statquant2 wrote:

>
> Hi all,
> browsing for a nice theme I found this http://leetless.de/vim.html, I am
> intersted to understand how you can have this nice display of indentation
> you can see on any theme of the page.
> I browsed the guy .vimrc file but I can't make it work.
>
> Do somebody have some insight ?
>
> Cheers

You need to do something like this:

set list listchars=tab:»·,trail:·,extends:$,nbsp:=

trail is for trailing spaces, extends I don't remember what for, nbsp is
a non-breaking space char. Experiment with tab chars...  -ak

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

statquant2
Yes thanks  almost there!!!!
set list listchars=tab:\|-,trail:-,extends:$,nbsp:=
is doing fine but it is missing to fill the lines without code

Here is what I get
|----int test;
|----int test2;
//here there should be some |----
|----int test3;
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

Brian L. Matthews
In reply to this post by statquant2
On 11/1/10 9:26 AM, statquant2 wrote:
> browsing for a nice theme I found this http://leetless.de/vim.html, I am
> intersted to understand how you can have this nice display of indentation
> you can see on any theme of the page.
> I browsed the guy .vimrc file but I can't make it work.

It's the tab setting in his lcs (aka listchars) setting. I use:

set listchars=eol:$,tab:>─,extends:>,precedes:<,nbsp:~$

I've also used:

set listchars=eol:$,tab:|_,extends:>,precedes:<,nbsp:~$

Brian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

Andrei Kulakov
In reply to this post by statquant2
On 11/01/2010 12:54 PM, statquant2 wrote:

>
> Yes thanks  almost there!!!!
> set list listchars=tab:\|-,trail:-,extends:$,nbsp:=
> is doing fine but it is missing to fill the lines without code
>
> Here is what I get
> |----int test;
> |----int test2;
> //here there should be some |----
> |----int test3;
>

I don't think you can do that. He probably has some actual tabs in the
"empty" lines. -ak

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

Brian L. Matthews
In reply to this post by Brian L. Matthews
On 11/1/10 9:55 AM, Brian L. Matthews wrote:

> On 11/1/10 9:26 AM, statquant2 wrote:
>> browsing for a nice theme I found this http://leetless.de/vim.html, I am
>> intersted to understand how you can have this nice display of
>> indentation
>> you can see on any theme of the page.
>> I browsed the guy .vimrc file but I can't make it work.
>
> It's the tab setting in his lcs (aka listchars) setting. I use:
>
> set listchars=eol:$,tab:>─,extends:>,precedes:<,nbsp:~$
>
> I've also used:
>
> set listchars=eol:$,tab:|_,extends:>,precedes:<,nbsp:~$

Ok, this is what I get for doing things from memory and not testing. :-(
You have to escape the |:

set listchars=eol:$,tab:\|_,extends:>,precedes:<,nbsp:~$

Brian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

statquant2
not working Brian :(
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Nice display of leading tabs

Андрей Хитров
For tabs and trailing spaces I use those display settings
along with the theme "desert". To my taste it looks pretty cool,
at least for development in Python.

" displaying tab characters and trailing spaces
" with special characters \u2592\u2591 and \u2593
set lcs=tab:▒░,trail:▓
set list

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Loading...