If your version of Vim is compiled with multibyte
support and your terminal encoding is set correctly, you may use the Unicode box-drawing characters, which include horizontal and vertical lines as well as several varieties of intersections and blocks. Vim defines some default digraphs for these characters, such as vv
for │
(to enter a digraph, you use Ctrl-K; thus in insert mode ^Kvv
will insert the character │
at the cursor location). For the full list if your version of Vim supports it, type :digraphs
; for more information on the feature and to search by Unicode character name, type :help digraphs
.
Depending on your terminal settings and choice of font, however, box-drawing characters may not all render as connected lines, so your mileage may vary. For instance, on my machine vertical lines render as connected in the terminal (using Source Code Pro), but as broken lines in GVim (using DejaVu Sans Mono):
