New extension: Coding Cases

One for the programmers out there.

Coding Cases

Convert the selection to common identifier formats used in source code.

Download: CodeCase.popclipextz

Description

The extension has 5 actions, which can be individually toggled in settings:

  • camelCase (one-humped camel icon)
  • UpperCamelCase (two-humped camel icon)
  • kebab-case (kebab icon)
  • snake_case (snake icon)
  • CONSTANT_CASE (megaphone icon)

About

This is an extension for PopClip.

Author

Nick Moore

Acknowledgements

Requirements

Requires PopClip 2022.5

Links

Changelog

25 May 2022

  • Initial release

Any chance you could change CamelCase to… uhh… Space Case?

i.e., “ImportantDocument.pdf” to “Important Document.pdf” — for the non-programmers out here? :stuck_out_tongue_winking_eye:

#popclip
name: Space Case
icon: sc
after: paste-result
javascript: return require('case-anything').spaceCase(popclip.input.text)

You can see the other possibilities here: case-anything/README.md at 06b80317ec0bc7341c1c072b5f2499129af49bb0 · mesqueeb/case-anything · GitHub

Note that currently PopClip has v1.x of case-anything but will have v2 in next version which has some more cases and would also preserve the dot in your example: https://github.com/mesqueeb/case-anything. PopClip Beta here.

1 Like

This is perfect! Thank you!

1 Like

Nice, but doesn’t work with CAPITAL TEXT.