Is there an easier way to select a single line?
I am using the new layout, which consolidated breakpoints and line numbers in the same column. I feel this was a good change, as the breakpoint gutter, and line number gutter, were small while next to each other. But I often use the line numbers as a way to select one or more lines. This new change makes it difficult to select a single line, as one has to click and drag within the scope of a single line. Or drag across multiple lines, and drag back down to a single line.
Is there a way to only toggle a breakpoint when a modifier is pressed? Or vice versa, only select line(s) while a modifier key is pressed? A behavioral example being, when clicking a line number, the respective line is selected, while if ALT is held while clicking a line number, a breakpoint is toggled.
Please sign in to leave a comment.
Hi,
If you drag your mouse on the left gutter bar over the line numbers, it will select lines. Can this help to restore your workflow?
Not really. As mentioned, in order to select a single line, I end up having to drag across more than one, and then back down to the single line, in order to select the line without adding a break point. Yes, it is possible to get a single line when careful to select near one extremity of the line and drag to the other. But this is not ideal while coding, as the margin for error is quite high when there are only ~10px to work with.
As alternatives, I have also tried line copy/cut, when the cursor is not selecting a range and copy or cut is used . But this only works well for a single line, since copying multiple lines in this manner will often cause the next line to be cut as well(where the cursor ended).
So currently, my line selection methods are non-uniform in behavior, using copy/cut for single lines, and gutter select+drag for multiple lines. Being able to disable gutter break point selection(since adding/modifying breakpoints are already available as keybinds), or bind these gutter actions to a modifier, would be optimal.
Hello,
Thank you for the clarification.
Try to turn off the option "Breakpoints over line numbers" (press Shift-Shift, type "Breakpoints over line numbers", and turn it off). Can this help?
You cannot even imagine how helpful it was)
This is really painful, and it's bad having to disable the breakpoint feature to get the line selection feature. Ideally, both features (line selection and breakpoint toggle) would be viable here. Perhaps the hit area for line selection could be in the gutter to the left of the line number, where the recently-modified indicator is. It doesn't help that the toggle breakpoint hotkey (cmd+F8 on Mac) is a 3-button press (cmd+Fn+F8, none of which is close to the others) on many keyboard setups, which makes it unusable imo.
Besides toggling off “Breakpoints over line numbers”, you can also consider overwriting shortcuts or add your own definition in Settings | Keymap.
Thanks Tao Sun! This is the answer I was looking for!!
I set my 1 line select to Shift-Left-Mouse
jambrain, di you see Tao Sun's suggestion?