Skip to content

Issue with multiple cursors and different types of cases #29

@markbellingham

Description

@markbellingham

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions