-
Notifications
You must be signed in to change notification settings - Fork 54
Programmatically set multiple cursors #22
squarewave17
started this conversation in
General
-
Hello! I'm trying to set a cursor at the beginning of each line, like you would with alt + click. There doesn't seem to be a way to do it with setCursor(). Does anyone know of a way to do this?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
You can try the following methods:
for (let i = 1, len = editor?.lineCount(); i < len; i++) { editor.addSelection({ line: i, ch: 0 }); } editor.focus();
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
1 reply
-
That worked perfectly! Thank you!
Beta Was this translation helpful? Give feedback.
All reactions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment