You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@angelo-mollame: A few months ago, the replace functionality of VSCode has been enhanced to support replacements with case change. This allows you to change the case of texts you search. Examples are here.
It would be nice if this feature were supported in batch-replacer as well.
Consider the following input strings
"This is a STRING"
"here is Another String"
Here is some commands and the associated outputs:
Modifier \L changes the next element in all lowercase (using \U would change it in all uppercase)
replace-regex ""([^"]+)""
with "\L$1"
OUTPUT:
"this is a string"
"here is another string"
Modifier \l changes only the first character of the next element to lowercase (analogously, \u does that to uppercase)
replace-regex ""([^"]+)""
with "\l$1"
OUTPUT:
"this is a STRING"
"here is Another String"
Can this be done?
The text was updated successfully, but these errors were encountered:
As an alternative, we can introduce a way that does not replace text with some other text, but simply converts the case, by by using with-case instead of with. You can convert text to UPPERCASE:
// Input:// We use Keywords 'must' and 'should' as in RFC 2119// Output// We use Keywords 'MUST' and 'SHOULD' as in RFC 2119replace-regex"'[^']*?'"with-case"uppercase"
or to lowercase:
// Input:// We use Keywords 'MUST' and 'SHOULD' as in RFC 2119// Output// We use Keywords 'must' and 'should' as in rfc 2119replace-regex"'[^']*?'"with-case"lowercase"
I was able to have the JavaScript files of the extension itself modified, which should help someone that can do TypeScript to get it into the VSCode extension officially: case-conversion-hack.zip.
RieksJ
changed the title
Feature request: support replacements with case change
Feature request: support replacements with case-changes
Oct 23, 2020
RieksJ
changed the title
Feature request: support replacements with case-changes
Feature request: support replacements with case-changes (contains JS-code that implements this)
Jan 5, 2021
@angelo-mollame: A few months ago, the replace functionality of VSCode has been enhanced to support replacements with case change. This allows you to change the case of texts you search. Examples are here.
It would be nice if this feature were supported in batch-replacer as well.
Consider the following input strings
Here is some commands and the associated outputs:
Modifier
\L
changes the next element in all lowercase (using\U
would change it in all uppercase)Modifier
\l
changes only the first character of the next element to lowercase (analogously,\u
does that to uppercase)Can this be done?
The text was updated successfully, but these errors were encountered: