1" tests for 'langmap' 2 3source check.vim 4CheckFeature langmap 5 6func Test_langmap() 7 new 8 set langmap=}l,^x,%v 9 10 call setline(1, ['abc']) 11 call feedkeys('gg0}^', 'tx') 12 call assert_equal('ac', getline(1)) 13 14 " in Replace mode 15 " need silent! to avoid a delay when entering Insert mode 16 call setline(1, ['abcde']) 17 silent! call feedkeys("gg0lR%{z\<Esc>00", 'tx') 18 call assert_equal('a%{ze', getline(1)) 19 20 " in Select mode 21 " need silent! to avoid a delay when entering Insert mode 22 call setline(1, ['abcde']) 23 silent! call feedkeys("gg0}%}\<C-G>}^\<Esc>00", 'tx') 24 call assert_equal('a}^de', getline(1)) 25 26 quit! 27endfunc 28