On Mon, 5 Jul 2010, [email protected] wrote:
> "set listchars=tab:\|\ " (| and <sp>) really works fine when i use
> <tab> to indent files, but is there a way to show | chars when i use
> <sp> to indent program, especially when writing python?
>
With a Vim that has the 'conceal' feature:
" if shiftwidth = 3
:syntax LeadSpace match=/\(^\( \{3}\)*\)\@<=\zs \ze \{2}/ conceal cchar=│
" if shiftwidth = 4
:syntax LeadSpace match=/\(^\( \{4}\)*\)\@<=\zs \ze \{3}/ conceal cchar=│
:set conceallevel=1
That last char is Ux2502 (^V u 2 5 0 2): │ BOX DRAWINGS LIGHT VERTICAL
(For me, that makes consecutive vertical lines seamless.)
Some other possibly-useful cchar choices: │┃┆┇┊┋║ ▉▊▋▌▍▎▏▐░▒▓
The fact that the current line isn't 'conceal'ed is a bit off-putting in
this case, but see if you like it.
I found the following looked better (w/ &term='rxvt-unicode256'):
:highlight Conceal cterm=NONE ctermfg=250 ctermbg=NONE
--
Best,
Ben
--
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