0

In Notepad++, I'm used to using Alt+Shift+/// to put expand the cursor across multiple lines in a vertical line or rectangular selection. I think Visual Studio does something similar.

I'm trying Sublime and Atom instead. Ctrl+D, Ctrl+click, and Alt+click + drag are very cool, but I miss using the arrow keys to make my vertical selections.

Is there a way to do vertical/rectangle selects in Sublime Text 3 or Atom with the arrow keys? I'm open to installing packages.

Example

  1. Say I have this ( represents the cursor, ignore the spaces in that column):

    x = os│.join(a, b)
    y = os .join(b, c)
    z = os .join(c, d)
    
  2. I realize I forgot the module name, so I hit Alt+Shift++ and have:

    x = os│.join(a, b)
    y = os│.join(a, b)
    z = os│.join(a, b)
    
  3. I type .path and now I have:

    x = os.path│.join(a, b)
    y = os.path│.join(a, b)
    z = os.path│.join(a, b)
    

I'd like to do the second step in Sublime Text 3 or Atom.

  • The corresponding Sublime Text keybindings on windows are ctrl+alt+up/down – r-stein Sep 13 '16 at 17:18
1

In Atom, you can install the multi-cursor which works exactly like Notepad++.

I'm not sure about Sublime Text, but take a look at the MarkAndMove or PowerCursor packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.