Mercurial > vim
comparison src/testdir/test_listchars.in @ 6777:a8962f0e0d34 v7.4.710
patch 7.4.710
Problem: It is not possible to make spaces visibible in list mode.
Solution: Add the "space" item to 'listchars'. (David B?rgin, issue 350)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 21 Apr 2015 18:33:48 +0200 |
parents | |
children | 095b538d58a6 |
comparison
equal
deleted
inserted
replaced
6776:576baee36b1a | 6777:a8962f0e0d34 |
---|---|
1 Tests for 'listchars' display with 'list' and :list | |
2 | |
3 STARTTEST | |
4 :so small.vim | |
5 :let g:lines = [] | |
6 :function GetScreenCharsForLine(lnum) | |
7 : return join(map(range(1, virtcol('$')), 'nr2char(screenchar(a:lnum, v:val))'), '') | |
8 :endfunction | |
9 :nnoremap <expr> GG ":call add(g:lines, GetScreenCharsForLine(".screenrow()."))\<CR>" | |
10 :set listchars+=tab:>-,space:.,trail:< | |
11 :set list | |
12 : | |
13 /^start:/ | |
14 :normal! jzt | |
15 GG | |
16 GG | |
17 GG | |
18 GG | |
19 GGH: | |
20 :set listchars-=trail:< | |
21 GG | |
22 GG | |
23 GG | |
24 GG | |
25 GG: | |
26 :put =g:lines | |
27 :'[,']w! test.out | |
28 ENDTEST | |
29 | |
30 start: | |
31 aa | |
32 bb | |
33 cccc | |
34 dd ee | |
35 | |
36 | |
37 | |
38 STARTTEST | |
39 :set listchars+=trail:< | |
40 :set nolist | |
41 : | |
42 /^start:/ | |
43 :redir! >> test.out | |
44 :+1,$list | |
45 :redir END | |
46 :q! | |
47 ENDTEST | |
48 | |
49 start: | |
50 fff | |
51 gg | |
52 h | |
53 iii |