6777
|
1 Tests for 'listchars' display with 'list' and :list
|
|
2
|
|
3 STARTTEST
|
|
4 :so small.vim
|
6824
|
5 :set ff=unix
|
6777
|
6 :let g:lines = []
|
|
7 :function GetScreenCharsForLine(lnum)
|
|
8 : return join(map(range(1, virtcol('$')), 'nr2char(screenchar(a:lnum, v:val))'), '')
|
|
9 :endfunction
|
|
10 :nnoremap <expr> GG ":call add(g:lines, GetScreenCharsForLine(".screenrow()."))\<CR>"
|
|
11 :set listchars+=tab:>-,space:.,trail:<
|
|
12 :set list
|
|
13 :
|
|
14 /^start:/
|
|
15 :normal! jzt
|
|
16 GG
|
|
17 GG
|
|
18 GG
|
|
19 GG
|
|
20 GGH:
|
|
21 :set listchars-=trail:<
|
|
22 GG
|
|
23 GG
|
|
24 GG
|
|
25 GG
|
|
26 GG:
|
|
27 :put =g:lines
|
|
28 :'[,']w! test.out
|
|
29 ENDTEST
|
|
30
|
|
31 start:
|
|
32 aa
|
|
33 bb
|
|
34 cccc
|
|
35 dd ee
|
|
36
|
|
37
|
|
38
|
|
39 STARTTEST
|
|
40 :set listchars+=trail:<
|
|
41 :set nolist
|
|
42 :
|
|
43 /^start:/
|
|
44 :redir! >> test.out
|
|
45 :+1,$list
|
|
46 :redir END
|
|
47 :q!
|
|
48 ENDTEST
|
|
49
|
|
50 start:
|
|
51 fff
|
|
52 gg
|
|
53 h
|
|
54 iii
|