annotate src/testdir/test_mapping.in @ 9465:203792348947 v7.4.2013

commit https://github.com/vim/vim/commit/67081e50616ae9546621072c5eaaa59bd0a4bed7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 9 21:49:03 2016 +0200 patch 7.4.2013 Problem: Using "noinsert" in 'completeopt' breaks redo. Solution: Set compl_curr_match. (Shougo, closes https://github.com/vim/vim/issues/874)
author Christian Brabandt <cb@256bit.org>
date Sat, 09 Jul 2016 22:00:06 +0200
parents c8efa41dd451
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6299
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Test for mappings and abbreviations
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :so mbyte.vim
6310
3ec6e0ef4a67 updated for version 7.4.488
Bram Moolenaar <bram@vim.org>
parents: 6299
diff changeset
6 :set encoding=utf-8
6299
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 : " abbreviations with р (0x80) should work
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :inoreab чкпр vim
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 GAчкпр
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 
6491
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
11 :" mapping of ctrl-c in Insert mode
6482
ccb6962585f1 updated for version 7.4.569
Bram Moolenaar <bram@vim.org>
parents: 6445
diff changeset
12 :set cpo-=< cpo-=k
ccb6962585f1 updated for version 7.4.569
Bram Moolenaar <bram@vim.org>
parents: 6445
diff changeset
13 :inoremap <c-c> <ctrl-c>
ccb6962585f1 updated for version 7.4.569
Bram Moolenaar <bram@vim.org>
parents: 6445
diff changeset
14 :cnoremap <c-c> dummy
ccb6962585f1 updated for version 7.4.569
Bram Moolenaar <bram@vim.org>
parents: 6445
diff changeset
15 :cunmap <c-c>
ccb6962585f1 updated for version 7.4.569
Bram Moolenaar <bram@vim.org>
parents: 6445
diff changeset
16 GA
ccb6962585f1 updated for version 7.4.569
Bram Moolenaar <bram@vim.org>
parents: 6445
diff changeset
17 TEST2: CTRL-C |A|
ccb6962585f1 updated for version 7.4.569
Bram Moolenaar <bram@vim.org>
parents: 6445
diff changeset
18 
6491
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
19 :unmap <c-c>
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
20 :unmap! <c-c>
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
21 :"
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
22 :" mapping of ctrl-c in Visual mode
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
23 :vnoremap <c-c> :<C-u>$put ='vmap works'
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
24 GV
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
25 :vunmap <c-c>
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
26 :"
8cfbc34ae4aa updated for version 7.4.573
Bram Moolenaar <bram@vim.org>
parents: 6482
diff changeset
27 :" langmap should not get remapped in insert mode
6445
c8d6dbdd1156 updated for version 7.4.552
Bram Moolenaar <bram@vim.org>
parents: 6310
diff changeset
28 :inoremap { FAIL_ilangmap
c8d6dbdd1156 updated for version 7.4.552
Bram Moolenaar <bram@vim.org>
parents: 6310
diff changeset
29 :set langmap=+{ langnoremap
c8d6dbdd1156 updated for version 7.4.552
Bram Moolenaar <bram@vim.org>
parents: 6310
diff changeset
30 o+
6907
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
31 :" Insert-mode expr mapping with langmap
6445
c8d6dbdd1156 updated for version 7.4.552
Bram Moolenaar <bram@vim.org>
parents: 6310
diff changeset
32 :inoremap <expr> { "FAIL_iexplangmap"
c8d6dbdd1156 updated for version 7.4.552
Bram Moolenaar <bram@vim.org>
parents: 6310
diff changeset
33 o+
6907
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
34 :" langmap should not get remapped in Command-line mode
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
35 :cnoremap { FAIL_clangmap
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
36 :call append(line('$'), '+')
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
37 :cunmap {
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
38 :" Command-line mode expr mapping with langmap
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
39 :cnoremap <expr> { "FAIL_cexplangmap"
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
40 :call append(line('$'), '+')
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
41 :cunmap {
5b1eefbf9a53 patch 7.4.773
Bram Moolenaar <bram@vim.org>
parents: 6575
diff changeset
42 :"
6575
a7e485b683d8 updated for version 7.4.614
Bram Moolenaar <bram@vim.org>
parents: 6491
diff changeset
43 :" issue #212 (feedkeys insert mapping at current position)
a7e485b683d8 updated for version 7.4.614
Bram Moolenaar <bram@vim.org>
parents: 6491
diff changeset
44 :nnoremap . :call feedkeys(".", "in")<cr>
a7e485b683d8 updated for version 7.4.614
Bram Moolenaar <bram@vim.org>
parents: 6491
diff changeset
45 :/^a b
a7e485b683d8 updated for version 7.4.614
Bram Moolenaar <bram@vim.org>
parents: 6491
diff changeset
46 0qqdw.ifooqj0@q:unmap .
a7e485b683d8 updated for version 7.4.614
Bram Moolenaar <bram@vim.org>
parents: 6491
diff changeset
47
7074
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
48 :" <c-g>U<cursor> works only within a single line
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
49 :imapclear
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
50 :imap ( ()<c-g>U<left>
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
51 G2oki
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
52 Test1: text with a (here some more textk.
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
53 :" test undo
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
54 G2oki
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
55 Test2: text wit a (here some more text [und undo]uk.u
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
56 :"
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
57 :imapclear
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
58 :set whichwrap=<,>,[,]
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
59 G3o2k
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
60 :exe ":norm! iTest3: text with a (parenthesis here\<C-G>U\<Right>new line here\<esc>\<up>\<up>."
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
61
c8efa41dd451 commit https://github.com/vim/vim/commit/8b5f65a527c353b9942e362e719687c3a7592309
Christian Brabandt <cb@256bit.org>
parents: 6907
diff changeset
62
6445
c8d6dbdd1156 updated for version 7.4.552
Bram Moolenaar <bram@vim.org>
parents: 6310
diff changeset
63
6299
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 :/^test/,$w! test.out
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 :qa!
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 ENDTEST
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 test starts here:
3eb160c5b3a1 updated for version 7.4.483
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69
6575
a7e485b683d8 updated for version 7.4.614
Bram Moolenaar <bram@vim.org>
parents: 6491
diff changeset
70 a b c d
a7e485b683d8 updated for version 7.4.614
Bram Moolenaar <bram@vim.org>
parents: 6491
diff changeset
71 a b c d
a7e485b683d8 updated for version 7.4.614
Bram Moolenaar <bram@vim.org>
parents: 6491
diff changeset
72