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

Don't do inference from end to start #143

Merged
merged 4 commits into from
Aug 3, 2021
Merged

Don't do inference from end to start #143

merged 4 commits into from
Aug 3, 2021

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Jul 25, 2021

take air past line bat should not take line for air
take air past state bat should not take state for air

With this behavior now consistent we probably can just close #8

@AndreasArvidsson AndreasArvidsson marked this pull request as draft August 1, 2021 09:33
@AndreasArvidsson AndreasArvidsson marked this pull request as ready for review August 1, 2021 12:26
@AndreasArvidsson
Copy link
Member Author

AndreasArvidsson commented Aug 2, 2021

@brxck @sterlind
What do you guys think about this? @pokey and me have a little bit of different view on this.

I'm of the opinion that you should never do inference from back to front while pokey want it in the case of missing start mark.
eg. take past air
My thoughts is that that is just syntactic sugar for take this past air so it's still inference from end to start.

I want us to reach some consensus about this so I can do the changes. Because the original problem with take air past line bat really bugs me.

@pokey
Copy link
Member

pokey commented Aug 3, 2021

So @AndreasArvidsson you're arguing that "take past line air" should select from cursor to the end of line containing 'a', rather than from beginning of current line to end of line containing 'a'? So in your version you'd say "take line past air" if you did in fact want to include the entire line containing cursor? I do feel that while we're using "past", this version is confusing, because it sounds like we want the line after "air". But if we switch to "through" when conformer number bugs are fixed, it's a bit clearer: "take line through air" or even "take lines through air" if we want to support plurals.

Given that the code is simpler this way, I won't push too strongly against it if people feel it's intuitive

@brxck
Copy link
Collaborator

brxck commented Aug 3, 2021

I think Andreas's suggestion lines up with what I would intuitively expect.

"through" would be a nice variation as I've caught myself trying to say it before.

@pokey
Copy link
Member

pokey commented Aug 3, 2021

Ok cool let's get a couple tests in to make sure I can't sneak my old grammar in here and then merge it in!

@AndreasArvidsson
Copy link
Member Author

@pokey Tests added!

Copy link
Member

@pokey pokey left a comment

Choose a reason for hiding this comment

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

This looks great. Shall we add "take past line air" and "take line past air" before merging? Maybe I missed those?

@AndreasArvidsson
Copy link
Member Author

@pokey Last two test added. Go ahead and merge.

@pokey pokey merged commit 9f0405d into master Aug 3, 2021
@pokey pokey deleted the start_inference branch August 3, 2021 21:57
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.

Infer type of first swap argument
3 participants