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.

 

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.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 post

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 post
  • 2 weeks later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...