Is it possible to get Vim to display vertical lines that help to track indentation? I can't think of the best way to describe it (or search for it), but you can see it in this screenshot (http://www.rutherfurd.net/files/jedit/jedit_ss3.jpg).
In addition to what was said about 'list' and 'listchars', to track
indentation you could also use the 'cursorcolumn' option, see
:help 'cursorcolumn'
:help 'cursorline'
:help hl-CursorColumn
:help hl-CursorLine
Personally I use
set cuc cul
in my vimrc, and
hi CursorColumn term=underline cterm=underline guibg=#F4F4F4
hi! link CursorLine CursorColumn
in my homemade colorscheme (a very light grey in the GUI so as to be
visible but not too distracting on a white field).
Best regards,
Tony.
--
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
-- Isaac Asimov
Spaces are spaces: Vim won't show them differently (except end-of-line
spaces with trail:- in 'listchars').
If you set 'cursorcolumn' on, the cursor column will have a distinctive
highlight, so you'll be able to see (by moving the cursor to the first
nonblank in a line) whether your indented lines line up the way they should.
Best regards,
Tony.
--
7:30, Channel 5: The Bionic Dog (Action/Adventure)
The Bionic Dog gets a hormonal short-circuit and violates the
Mann Act with an interstate Greyhound bus.
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
I use Charles Campbell's SeeTab.vim plugin to do this.
-- Thomas Adam