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.

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

2 Answers 2

1

Sublime Text has this feature in built and it's called Column Selection functionality. It's super simple: Ctrl+Shift+/

Or, if you have a middle mouse button, just middle click and drag (in Windows and macOS).

Documentation

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .