Allow abbreviations to expand.

This commit is contained in:
Israel Chauca Fuentes
2017-02-05 01:28:35 -05:00
parent 2335c4ae27
commit c4b5877958
2 changed files with 21 additions and 15 deletions

View File

@@ -20,7 +20,7 @@ call DMTest_pairs('()', ["a\<BS>"], "")
call DMTest_pairs('()', ["a)", 'ax'], "()x")
"call DMTest_pairs('', "((\<C-G>gx", "(())x")
call DMTest_pairs('', ["i(x\<Esc>u"], "")
call DMTest_pairs('', ["i@(","ax"], "@(x)")
call DMTest_pairs('', ["i@", "a(","ax"], "@(x)")
call DMTest_pairs('@#', ["a(","ax"], "@(x)#")
call DMTest_pairs('\', ["a(","ax"], '\(x')
call DMTest_pairs('', ["a(",'a\', 'a)', "ax"], '(\)x)')
@@ -36,8 +36,9 @@ let g:delimitMate_expand_space = 1
let g:delimitMate_autoclose = 1
call DMTest_pairs('', ['i(', "a\<Space>", 'ax'], "( x )")
" <Right> needs to be after <BS> so the cursor stays in the expected place for when
" the doau commands fire.
call DMTest_pairs('( )', ["2|a\<BS>\<Right>"], 'ix'], "(x)")
" the :doau commands fire.
call DMTest_pairs('( )', ["2|a\<BS>\<Right>", 'ix'], "(x)")
call DMTest_pairs('', ["iabc ", 'ax'], "abc x")
let g:delimitMate_autoclose = 0
call DMTest_pairs('', ["i(", "a)", "a\<Space>", "a\<BS>\<Right>", "ix"], "(x)")
let g:delimitMate_autoclose = 1
@@ -57,7 +58,8 @@ call DMTest_pairs('', ["i(", "aa", "i)"], "()a)")
"unlet b:delimitMate_eol_marker
" Expand iabbreviations
iabb def ghi
call DMTest_pairs('', ["idef("], "ghi()")
" TODO not sure how to make this test work
call DMTest_pairs('', ["idef("], "ghi()", '', 1)
iunabb def
"
"call DMTest_pairs('', "abc а\<Left>(", "abc (а")