How to split selection into lines?

The command is ‘Add Cursors to Line Ends’ (found in the command palette or the Selection menu). The default keyboard shortcut is Shift+Alt+I.


If you’re familiar with Sublime Text, you may prefer Ctrl+Shift+L as a shortcut. In File / Preferences / Keyboard Shortcuts (Json):

{
    "key": "ctrl+shift+l",
    "command": "editor.action.insertCursorAtEndOfEachLineSelected",
    "when": "editorTextFocus"
},

This overrides a default keyboard shortcut, “Select all occurrences of current selection”.

Leave a Comment