At my company we have two different style guides for java vs sql. In java I have a field named historyOfPresentIllness
and when i write the sql, I want to name it history_of_present_illness
. Is there a keyboard shortcut to switch from one to the other when I have the phrase highlighted? Or perhaps a plugin that can do this?
While I'm asking, I may as well ask if there's a way to turn historyOfPresentIllness
to history-of-present-illness
. That's from java to clojure style.
I use a plugin called String Manipulation which has the capabilities you're looking for (and more).
Select historyOfPresentIllness
and press Alt+M to bring up the plugin menu, then press:
history_of_present_illness
history-of-present-illness
To make this easier, you could set up a shortcut at File | Settings | Keymap
.
historyOfPresentIllness
--> history_of_present_illness
--> HISTORY_OF_PRESENT_ILLNESS
--> HistoryOfPresentIllness
--> historyOfPresentIllness
However, after trying it out, there seems to be a bug with this plugin which prevents you from undoing any changes. Update: it appears this bug has been fixed for a while now, so the CamelCase plugin is probably the way to go.