Mercurial > vim
annotate src/testdir/test_mapping.in @ 9254:05e7d084c6c2 v7.4.1910
commit https://github.com/vim/vim/commit/abc70bbf363dbbe3f2bf714102f55648a512791e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 8 21:48:50 2016 +0200
patch 7.4.1910
Problem: Tests using external command to delete directory.
Solution: Use delete().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 08 Jun 2016 22:00:06 +0200 |
parents | c8efa41dd451 |
children |
rev | line source |
---|---|
6299 | 1 Test for mappings and abbreviations |
2 | |
3 STARTTEST | |
4 :so small.vim | |
5 :so mbyte.vim | |
6310 | 6 :set encoding=utf-8 |
6299 | 7 : " abbreviations with р (0x80) should work |
8 :inoreab чкпр vim | |
9 GAчкпр | |
10 | |
6491 | 11 :" mapping of ctrl-c in Insert mode |
6482 | 12 :set cpo-=< cpo-=k |
13 :inoremap <c-c> <ctrl-c> | |
14 :cnoremap <c-c> dummy | |
15 :cunmap <c-c> | |
16 GA | |
17 TEST2: CTRL-C |A| | |
18 | |
6491 | 19 :unmap <c-c> |
20 :unmap! <c-c> | |
21 :" | |
22 :" mapping of ctrl-c in Visual mode | |
23 :vnoremap <c-c> :<C-u>$put ='vmap works' | |
24 GV | |
25 :vunmap <c-c> | |
26 :" | |
27 :" langmap should not get remapped in insert mode | |
6445 | 28 :inoremap { FAIL_ilangmap |
29 :set langmap=+{ langnoremap | |
30 o+ | |
6907 | 31 :" Insert-mode expr mapping with langmap |
6445 | 32 :inoremap <expr> { "FAIL_iexplangmap" |
33 o+ | |
6907 | 34 :" langmap should not get remapped in Command-line mode |
35 :cnoremap { FAIL_clangmap | |
36 :call append(line('$'), '+') | |
37 :cunmap { | |
38 :" Command-line mode expr mapping with langmap | |
39 :cnoremap <expr> { "FAIL_cexplangmap" | |
40 :call append(line('$'), '+') | |
41 :cunmap { | |
42 :" | |
6575 | 43 :" issue #212 (feedkeys insert mapping at current position) |
44 :nnoremap . :call feedkeys(".", "in")<cr> | |
45 :/^a b | |
46 0qqdw.ifooqj0@q:unmap . | |
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 | 63 |
6299 | 64 :/^test/,$w! test.out |
65 :qa! | |
66 ENDTEST | |
67 | |
68 test starts here: | |
69 | |
6575 | 70 a b c d |
71 a b c d | |
72 |