Replies: 1 comment 1 reply
-
I don't think this makes sense as a separate feature because you could only do this for the first character. For more complex casing rules this is impossible to future out for the editor. I would suggest just doing multiple seperate replaces instead. It's quite easy to do. First replace all non-lowercase varatants (doesn't match the lowercase version because smart case) and then do the lowercase variant last (at that point canse insensitive won't matter). You could also force case-senstive mode by prefixing your search with ``(?-i) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Frequently, I'll have some block of code where I want to copy it and replace a certain word everywhere. For example, I might start with:
And I'll want to add a corresponding block for an
endTime
parameter. So I'll copy the block and do something like Alt+o Alt+o (to select the whole statement block) sstartcend. And I'll end up with:The problem is the
WithendTime
, which should naturally beWithEndTime
. And for small cases, I just manually change it, but for larger/more complicated cases, it ends up being quite tedious, so I end up replacing each variant (Start
,start
,START
, etc) individually.I think the way I'd implement this idea is to have a 'case-sensitive' variant of c (maybe Alt+c?) that automatically substituted matches based on their case.
I saw an open issue (#4978) which looked vaguely related, but I couldn't tell if that's advocating for the same thing.
Beta Was this translation helpful? Give feedback.
All reactions