wmaurer/vscode-change-case

Do not change case for text inside strings

mortenbra opened this issue · 1 comments

It is often not desirable to change the text inside a string when changing the case of the rest of the code. For example, consider the following PL/SQL code:

DISPLAY_GREETING ('Hello World!');

When changing this to lower case, I would like to retain the mixed case inside the string, so the result should look like:

display_greeting ('Hello World!');

Could be done by either adding a global setting for this, or just adding a separate command "lowercase all except string values" or something like that.

Seems hard to do... because it totally depend on the language you are editing.
Eg. in JavaScript, strings can be "foo", 'foo' or even foo. And in foo${bar}, bar is not a string, but an identifier... In some languages, """foo""" is also a string, and so on.
And what about comments?
This kind of specialized task is more a job for a script, for example, than for a generic tool like this one.

Just the opinion of a user like you, of course.