atom-editor

Vertical multi-cursor with keyboard


I often need to create a vertical multi-cursor like this:

I do this by pressing Ctrl and clicking very carefully with the mouse five times below the line. Is there a shortcut for so that I can create the vertical line with the down key of my keyboard? Pressing five times the down key + ?? would be faster and more convenient for me than doing it with my mouse.


Solution

  • The command you're looking for is editor:add-selection-below, which by default is bound to Alt+Shift+↓.

    There is of course an -above variant: Alt+Shift+↑

    And then there's find-and-replace:select-next1, bound to Ctrl+d, which gives you multiple cursors for similar bits of text, even when they're not vertically aligned.


    1 If you have the find-and-replace package enabled, which you probably do since it's included with Atom by default.