2014-10-21 16:22:17 +02:00
|
|
|
|
Test for mappings and abbreviations
|
|
|
|
|
|
|
|
|
|
|
|
STARTTEST
|
|
|
|
|
|
:so small.vim
|
|
|
|
|
|
:so mbyte.vim
|
2014-10-22 22:09:01 +02:00
|
|
|
|
:set encoding=utf-8
|
2014-10-21 16:22:17 +02:00
|
|
|
|
: " abbreviations with р (0x80) should work
|
|
|
|
|
|
:inoreab чкпр vim
|
|
|
|
|
|
GAчкпр
|
|
|
|
|
|
|
2015-01-14 16:08:32 +01:00
|
|
|
|
:" mapping of ctrl-c in Insert mode
|
2015-01-14 12:44:41 +01:00
|
|
|
|
:set cpo-=< cpo-=k
|
|
|
|
|
|
:inoremap <c-c> <ctrl-c>
|
|
|
|
|
|
:cnoremap <c-c> dummy
|
|
|
|
|
|
:cunmap <c-c>
|
|
|
|
|
|
GA
|
|
|
|
|
|
TEST2: CTRL-C |A|
|
|
|
|
|
|
|
2015-01-14 16:08:32 +01:00
|
|
|
|
:unmap <c-c>
|
|
|
|
|
|
:unmap! <c-c>
|
|
|
|
|
|
:"
|
|
|
|
|
|
:" mapping of ctrl-c in Visual mode
|
|
|
|
|
|
:vnoremap <c-c> :<C-u>$put ='vmap works'
|
|
|
|
|
|
GV
|
|
|
|
|
|
:vunmap <c-c>
|
|
|
|
|
|
:"
|
|
|
|
|
|
:" langmap should not get remapped in insert mode
|
2014-12-14 00:43:54 +01:00
|
|
|
|
:inoremap { FAIL_ilangmap
|
|
|
|
|
|
:set langmap=+{ langnoremap
|
|
|
|
|
|
o+
|
2015-07-10 17:19:30 +02:00
|
|
|
|
:" Insert-mode expr mapping with langmap
|
2014-12-14 00:43:54 +01:00
|
|
|
|
:inoremap <expr> { "FAIL_iexplangmap"
|
|
|
|
|
|
o+
|
2015-07-10 17:19:30 +02:00
|
|
|
|
:" langmap should not get remapped in Command-line mode
|
|
|
|
|
|
:cnoremap { FAIL_clangmap
|
|
|
|
|
|
:call append(line('$'), '+')
|
|
|
|
|
|
:cunmap {
|
|
|
|
|
|
:" Command-line mode expr mapping with langmap
|
|
|
|
|
|
:cnoremap <expr> { "FAIL_cexplangmap"
|
|
|
|
|
|
:call append(line('$'), '+')
|
|
|
|
|
|
:cunmap {
|
|
|
|
|
|
:"
|
2015-02-03 16:53:51 +01:00
|
|
|
|
:" issue #212 (feedkeys insert mapping at current position)
|
|
|
|
|
|
:nnoremap . :call feedkeys(".", "in")<cr>
|
|
|
|
|
|
:/^a b
|
|
|
|
|
|
0qqdw.ifooqj0@q:unmap .
|
|
|
|
|
|
|
2015-09-01 19:26:12 +02:00
|
|
|
|
:" <c-g>U<cursor> works only within a single line
|
|
|
|
|
|
:imapclear
|
|
|
|
|
|
:imap ( ()<c-g>U<left>
|
|
|
|
|
|
G2oki
|
|
|
|
|
|
Test1: text with a (here some more textk.
|
|
|
|
|
|
:" test undo
|
|
|
|
|
|
G2oki
|
|
|
|
|
|
Test2: text wit a (here some more text [und undo]uk.u
|
|
|
|
|
|
:"
|
|
|
|
|
|
:imapclear
|
|
|
|
|
|
:set whichwrap=<,>,[,]
|
|
|
|
|
|
G3o2k
|
|
|
|
|
|
:exe ":norm! iTest3: text with a (parenthesis here\<C-G>U\<Right>new line here\<esc>\<up>\<up>."
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-14 00:43:54 +01:00
|
|
|
|
|
2014-10-21 16:22:17 +02:00
|
|
|
|
:/^test/,$w! test.out
|
|
|
|
|
|
:qa!
|
|
|
|
|
|
ENDTEST
|
|
|
|
|
|
|
|
|
|
|
|
test starts here:
|
|
|
|
|
|
|
2015-02-03 16:53:51 +01:00
|
|
|
|
a b c d
|
|
|
|
|
|
a b c d
|
|
|
|
|
|
|