This page looks best with JavaScript enabled

VSCode Multicursor Magic

 ·  ☕ 1 min read  ·  🥓🥓🥓 werkn

Multicursors is something that I never made use of in Vim. In VSCode its a feature that I love especially when working with HTML or anything with multiple repeated structured columns (like CSV files).

Multicursor Shortcuts

Shortcut Description
Alt+Click Add a cursor where you clicked
Ctrl+d Select word under cursor, hit multiple times to add a cursor at each new match
Ctrl+Shift+Alt+Up Add cursor up
Ctrl+Shift+Alt+Up Add cursor down
Ctrl+Shift+l Add cursor at each occurrence of highlighted text

Editing Workflow/Tips

To select multiple words in a file and add a cursor at the start of each word, select the word and continue to press Ctrl+d.

select multiple words

To expand selection based on highlighted word, begin by highlighting the word(s) and press Ctrl/Cmd+Shift+L.

show multiple cursors

References:

Share on

Ryan Radford
WRITTEN BY
werkn
Developer / IT Guy / Tinkerer