Whilst running the hotkey for multiple cursors CMD + D I keep finding myself in need of skipping only one item.
So for instance, in the following code, pipes indicate my current selection and the item in the middle I would like to skip.
checked=""|
checked=""|
checked=""|
checked=""| // <-- I am here in my selection
checked="" // <-- skip this item for selection and proceed to select the rest
checked=""
checked=""
checked=""
Is this doable in VSCode?
What have I tried so far?
I have tried using shift and looking up the VSCode shortcuts documentation.
You can press Ctrl + K and Ctrl + D at the same time to skip a selection.
VS Code provides two powerful commands to navigate in and across files with easy-to-use key bindings. Hold Ctrl and press Tab to view a list of all files open in an editor group. To open one of these files, use Tab again to pick the file you want to navigate to, then release Ctrl to open it.
Highlight the row and press ENTER. Press Shift + Space.
F1 → open Keyboard Shortcuts → search for 'Indent Line', and change keybinding to Tab . It will allow you to indent line when something in that line is selected (multiple lines still work).
There are two ways:
{
"key": "ctrl+k ctrl+d",
"command": "editor.action.moveSelectionToNextFindMatch",
"when": "editorFocus"
}
This keybinding is already there. You actually select the one you want to skip and then do Ctrl+K Ctrl+D to move that last selection you did to the next find match.
Or, just select them all with Ctrl+Shift+Land then go back with your multicursor modifier key Cmd/Alt and deselect the ones you don't want one by one.
Here is a demo of both methods - the gif doesn't show all the keystrokes very well unfortunately - the skip one is Ctrl+K Ctrl+D as explained above after you have selected one too many:
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