Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement square-bracket text object #467

Merged
merged 2 commits into from
Jul 19, 2016

Conversation

ascandella
Copy link
Contributor

References #287

@@ -268,6 +268,14 @@ suite("Mode Normal", () => {
});

newTest({
title: "Can handle 'ci[' spanning multiple lines",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding cases for a[, a], i]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I wasn't sure about the level of testing desired, given that the underlying functionality (character matching) is already covered. Happy to add more tests (and that's generally my default), but wanted to be sensitive to test run times if that's a concern for this project.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, the underlying functionality is coverd and no idea to test it again. I'll suggest adding tests for corner cases then we can make sure that we don't break this feature if we want to modify the architecture somehow one day.

For example, per Vim doc for a[, When used in Visual mode it is made characterwise. while this case is linewise. Another case is i", we need take escaped " into consideration.

Not sure did I cover this kind of corner cases perfectly when I implement aw/iw, but we can together push it to the limit, what do you think? I'm not saying your test cases really miss some corner cases(I'm just not sure).

@rebornix
Copy link
Member

LGTM

@johnfn johnfn merged commit bd7569e into VSCodeVim:master Jul 19, 2016
@johnfn
Copy link
Member

johnfn commented Jul 19, 2016

Thanks, @sectioneight!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants