There is a straightforward regex that can do what you want:
Find: ^0x|(.{8})(?!$)
But you have to enable the Find in Selection
option and trigger the Select All Matches
command yourself after entering it.
Or use a macro extension like multi-command and this keybinding to automate it:
{
"key": "alt+p",
"command": "extension.multiCommand.execute",
"args": {
"sequence": [
{
"command": "editor.actions.findWithArgs",
"args": {
"findInSelection": true,
"isRegex": true,
"searchString": "^0x|.{8}",
}
},
"editor.action.selectAllMatches",
"cursorRight"
]
},
}
You must select up to where you want the last cursor and then trigger the macro.
Because of a flaky implementation, you must start with the Find in Selection
option disabled in the Find Widget. I haven't found a way around that.
The setting Editor > Find: Seed Search String From Selection
must be set to never
. Otherwise your selected text will over-ride the searchString
from the macro above.

Here is the pure regex method with no extensions:
- Enter
^0x|(.{8})(?!$)
in your Find Widget with the regex option enabled.
^0x
the first part of the string you ultimately want a cursor after.
(.{8})(?!$)
select each 8-character block, but not the last - that is why there is a negative lookahead for the end of the line (?!$)
- so the last 8 characters are not matched. Don't worry, there will be a cursor in front of those last 8 characters as you want. (.{8})
doesn't actually need to be in a capture group, it is just clearer to see.
Select all the text to match: 0xffffffffeeeeeeee
. Stop the selection there - wherever you want the last cursor.
Enable the Find in Selection
option in the Find Widget by Alt+L.
Alt+Enter to select all the find matches respecting the Find in Selection
option: editor.action.selectHighlights
.
Step (4) will select your matches - you should have 4 for the above string. But you don't want the matches selected you just want a cursor at the beginning of each, so do step (5):
Right arrow: this cancels each selection with a cursor at the right end of each.
Type.
