Given the following Java code
On the MacBook in IntelliJ IDEA, I can hold the option key and mouse click 'n drag to select a block of text.
Is it possible to batch select just the text between the quotes all at once within a specific block of code, similar to Option+MouseClickAndDrag feature above, like this?
Notes added based on comments below
Cmd+W doesn't work since it expands the selection to highlight the full line, and eventually the entire code block. It does not select just the strings.
Shift+Alt+double-click is a closer solution, but requires you to manually double-click each string. I'd like a solution that selects them all at once.
Simply put your cursor between two quotes and hit Ctrl ' to select the text between the quotes. Hit it again and it will select the quote marks themselves.
You can use ⌃⌘G (macOS), or Ctrl+Alt+Shift+J to select all matching words in the document rather than selecting one at a time. You can use ⌃⇧G (macOS), or Alt+Shift+J (Windows/Linux) to remove the selection from the last selected occurrence.
Simply hit ctrl+c.
To navigate backwards, press Ctrl+Alt+Left . To navigate forward, press Ctrl+Alt+Right . To navigate to the last edited location, press Ctrl+Shift+Backspace . To find the current caret location in the editor, press Ctrl+M .
If you use CMD/CTRL + W
multiple times, you can expand your selection from the current cursor word to the enclosed string, to current line, depending on how many times your press it. This is depending on where your cursor is, at the time, unfortunately.
This tripped me up when I first started, because I always thought I was closing a tab
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With