Convert selected code to camel case using live templates.

How can I convert selected code to camel case (or snake case , or upper case doesn't matter) using live templates ? I want to select code, press something and convert it. 

9 comments
Comment actions Permalink

I want to use it for refactoring function name. Inserting getters and setters with ALT+INSERT generates function names in camel case but I need them in snake case.

0
Comment actions Permalink

Andriy it is my question :-D 

0
Comment actions Permalink

So why you gave me the link of question created by me :-D 

0
Comment actions Permalink

I did not gave that link to you -- I left it with "Ref" prefix -- that's for others who may wish to answer it (e.g. PhpStorm support) to see what other info you already have/know/tried so far -- to avoid unnecessary duplicates like re-asking the same questions etc.

0
Comment actions Permalink

Hello,

There is "String Manipulation" plugin that lets you to convert the case of selected text via the right click menu or via custom shortcuts assigned at Settings/Preferences > Keymap.

You can install the plugin via Settings/Preferences > Plugins > Browse repositories.

2
Comment actions Permalink

Thanks a lot Vladimir. it works fine

 

0

Please sign in to leave a comment.