1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
Amir
2024-10-06 10:25:50 +02:00
parent ee7e062909
commit 46294d589d
202 changed files with 306918 additions and 203617 deletions

View File

@ -1,6 +1,9 @@
describe 'snippet parser'
before
" two optional arguments:
" first one: whether or not to create the stop stubs
" second one: whether or not to return the stops
function! Parse(snippet, ...)
let [snip, stops] = snipmate#parse#snippet(a:snippet, (a:0 ? a:1 : 1))
return (a:0 > 1 && a:2) ? [snip, stops] : snip
@ -149,4 +152,19 @@ describe 'snippet parser'
Expect Parse("foo\n\nbar") == [['foo'], [''], ['bar']]
end
it 'parses a selection as a special var named "select" with each item'
Expect Parse("${1|foo|bar|baz|select}") ==
\ [[[1, ['select', 'foo', 'bar', 'baz', 'select']]]]
end
it 'stores selection items in the var dictionary'
let [snip, stops] = Parse("${1|foo|bar|baz|select}", 0, 1)
Expect stops[1].items == ['foo', 'bar', 'baz', 'select']
end
it 'sets a selections placeholder to the first item'
let [snip, stops] = Parse("${1|foo|bar|baz|select}", 0, 1)
Expect stops[1].placeholder == 'foo'
end
end