1
0
mirror of https://github.com/amix/vimrc synced 2025-06-17 10:55:00 +08:00

Updated Vim plugins

This commit is contained in:
Amir
2022-08-08 15:45:34 +02:00
parent a716fe1777
commit b41536726f
90 changed files with 2201 additions and 0 deletions

View File

@ -0,0 +1,29 @@
require 'spec_helper'
describe "Indenting" do
# Reference: https://docs.ruby-lang.org/en/master/doc/syntax/pattern_matching_rdoc.html
specify "pattern-matching with case-in" do
assert_correct_indenting 'rb', <<~EOF
case {a: a}
in {a:}
p a
end
EOF
assert_correct_indenting 'rb', <<~EOF
users = [{name: "Alice", age: 12}, {name: "Bob", age: 23}]
users.any? do |user|
user in {name: /B/, in: 20..}
end #=> true
EOF
end
specify "does not deindent while typing" do
assert_correct_indent_in_insert 'rb', <<~EOF, "index = 0", <<~RESULT
def foo
EOF
def foo
index = 0
RESULT
end
end