Skip to content

Issue with multiple cursors and different types of cases #29

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

Open
markbellingham opened this issue Aug 17, 2024 · 0 comments · May be fixed by #32
Open

Issue with multiple cursors and different types of cases #29

markbellingham opened this issue Aug 17, 2024 · 0 comments · May be fixed by #32

Comments

@markbellingham
Copy link

If your data has different types of case and you use multiple cursors to change them, each selection will cycle through the options independently before eventually settling one one type. Instead the system should choose a type for them all to switch to in the first instance (it doesn't matter which one) and then they will all cycle together.

A common use-case for me (and thanks very much btw), is when writing tests I will create a model using PHP's named parameters and test it (PHPStorm automatically fills in the property names):

$model = new Model(
    firstProp: 'Some value',
    secondProp: 'Other value',
    name: 'Yeah'
);

Then to test the repository functions, which return data in a snake_case array, I will copy the model properties and paste them into the array, then use multiple cursors to highlight the properties, put quotes around them and convert to snake_case, making it really quick to create the data for my test.

However, on the first cycle the above example will output an array looking like this:

$array = [
    'first_prop' => 'Some value',
    'second_prop' => 'Other value',
    'Name' => 'Yeah'
];

Notice how the first two keys are lower case snake but the third is title (or Pascal) case.

(N.B. I don't have all the case options selected, only PascalCase, camelCase, and snake_case)

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

Successfully merging a pull request may close this issue.

1 participant