question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple Cursors - Preserve Case

See original GitHub issue

Use Case Take the following: const [value, setValue] = useState();

I want to change it to: const [array, setArray] = useState();

Feature Ask It would be great to:

  1. Select value.
  2. Press Ctrl+D.
  3. Type array.
  4. See that both symbols have changed, while preserving their proper casing.

Right now, I need to conduct two edit operations to do this. Alternatively, I can use a single Find & Replace operation, but that would be disproportionately time-consuming for this task, as well as less precise.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:49
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hedietcommented, Oct 19, 2021

if you begin with a collapsed selection and press ctrl+d then the selection expands to the current word and for as long as you continue pressing ctrl+d, whole word and match case will be on

recording

if you begin with a non-collapsed selection and press ctrl+d, then the modifiers are taken from the last state of the find widget

recording

(from @alexdima) Collapsed selection means a selection of length 0.

2reactions
vscode-triage-botcommented, Nov 23, 2020

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple cursor case preserve - Visual Studio Marketplace
This extension preserves selection case in these situations. It recognises CAPS, Uppercase and lowercase. Works for typing or pasting.
Read more >
Case-sensitive multiselect in VS Code - J Ben Deaton
When I use multiselect (aka multiple cursor selection) in VS Code via Cmd+D (which is constantly), I usually prefer case-sensitive behavior ...
Read more >
Multiple cursors and selection ranges | IntelliJ IDEA ...
Successively press Alt+J to find and select the next occurrence of case-sensitively matching word or text range. https://resources.jetbrains.com ...
Read more >
vscode: Keep the cursor on the *last* instance when escaping ...
To quit the multiple cursors mode and go to normal single-cursor mode, you can use esc . However, this will move the cursor...
Read more >
Examples of Multi-Cursor for working with Data
I know, I just did the ultimate felony and used the Mouse. But stay tuned, I wouldn't usually do that for the use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found