-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat!: 5 new commands to toggle text between PascalCase
, camelCase
, snake_case
, Title Case
and kebab-case
#12043
base: master
Are you sure you want to change the base?
Conversation
PascalCase
, camelCase
, snake_case
, Title Case
and kebab-case
Imo, it shouldn't be a plugin. This is a useful feature that is handy to have in an editor when you need it, but it's not something you know you need until you need it. |
Btw, I only replied now because your reply was marked as "off topic" before How do comments get marked as off-topic? Is it automatic ,or someone marked yours? |
You can mark your own comments as off-topic but I also think that the repo owners are able to mark comments as offtopic as well.
I did it myself because I thought that my comment there might be not that "helpful" so I just marked it as "offtopic", just to be safe :) |
We have case conversion in helix core from the snippets system which should be used instead of another dependency https://github.com/helix-editor/helix/blob/master/helix-core%2Fsrc%2Fcase_conversion.rs |
Hopefully this gets merged, now that it's not even pulling dep. |
d010828
to
ad13dd5
Compare
split logic into variables and add comments
PascalCase
, camelCase
, snake_case
, Title Case
and kebab-case
PascalCase
, camelCase
, snake_case
, Title Case
and kebab-case
`patchy` is a tool which makes it easy to declaratively manage personal forks by automatically merging pull requests. Check it out here: https://github.com/NikitaRevenco/patchy
`patchy` is a tool which makes it easy to declaratively manage personal forks by automatically merging pull requests. Check it out here: https://github.com/NikitaRevenco/patchy
I added back the |
This PR introduces a new mode under
`
called "case" mode which has several utility key mappings for working with switching case of textswitch_case
,switch_to_lowercase
andswitch_to_uppercase
have been moved to this new mode. 5 new commands have been added and are accessible under`
as well:`l
switch_to_lowercase
`u
switch_to_uppercase
`p
switch_to_pascal_case
`c
switch_to_camel_case
`t
switch_to_title_case
`s
switch_to_snake_case
`k
switch_to_kebab_case
`a
switch_to_alternate_case
Closes #5197
Unlike #4615 this PR doesn't pull in any extra dependencies. It builds on top of the existing
case_conversion.rs
module and adds many tests to make sure that functionality is correct. The tests even fixed some edges with the existingcamelCase
implementationBreaking changes
Remaps several keys:
Alt-`
`u
`
`l
Renames a command:
switch_case
switch_to_alternate_case