Mercurial > vim
view 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 |
line wrap: on
line source
Tests for 'listchars' display with 'list' and :list STARTTEST :so small.vim :let g:lines = [] :function GetScreenCharsForLine(lnum) : return join(map(range(1, virtcol('$')), 'nr2char(screenchar(a:lnum, v:val))'), '') :endfunction :nnoremap <expr> GG ":call add(g:lines, GetScreenCharsForLine(".screenrow()."))\<CR>" :set listchars+=tab:>-,space:.,trail:< :set list : /^start:/ :normal! jzt GG GG GG GG GGH: :set listchars-=trail:< GG GG GG GG GG: :put =g:lines :'[,']w! test.out ENDTEST start: aa bb cccc dd ee STARTTEST :set listchars+=trail:< :set nolist : /^start:/ :redir! >> test.out :+1,$list :redir END :q! ENDTEST start: fff gg h iii