Jump to content

Code Case


Recommended Posts

Following up a request re: my Case Converter workflow, I've put together a case converter focused on code.

 

Updated 2021-08-04 to use Universal Actions - now requires Alfred 4.5 beta.

 

It's hosted on Packal: Code Case

 

There is a single script filter codecase which converts the argument
 
e.g.
 
codecase.png.9abc0521d2c0925906f5d0c309ed3f7b.png
 
and copies it to the clipboard.
 
The example shows a space delimited argument, but it will also convert between any of the cases, e.g. Camel -> Pascal, so
 
codecase myGreatVariableName
 
will return
 
my_great_variable_name
 
etc.
 
The workflow also contains blank hotkeys for each of the conversions (set up to act on selected text and paste into the frontmost app). 
 
 
Revisions:
 
1.4 (2021-08-04) updated to use Universal Actions, requiring Alfred 4.5 beta.  Also added more fun Space Case icon.
 
1.2.1 (2014-08-29):
- updated to use Alfred Workflow 1.8.6
1.2 (2014-08-29):
- added hotkeys
 
1.1 (2014-08-29):
- added Cobra Case (capitalized Snake Case) and separate words
- added uids so Alfred will sort results based on frequency of usage
Edited by dfay
Link to comment

Awesome! One more dfay workflow I will use 10x everyday  :)

 

Feature request :

If you could add a mix of the Camel case and the Pascal case (First letter of the word is a capital letter / space between words are replaced by an underscore --> My_Great_Variable_Name), I would be the happiest. (I name my files/folders using this case).

Link to comment
  • 2 weeks later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...