Selecting multiple lines in Atom

pyCthon picture pyCthon · Sep 1, 2014 · Viewed 42.2k times · Source

Is there any way in Atom to replicate the feature in Sublime Text where you can hold down the alt key and move the mouse up or down to select and create a cursor at the end of multiple line so you can edit multiple lines simultaneously?

Answer

Lee picture Lee · Sep 1, 2014

If I understand your question correctly, you want to select multiple lines and create a cursor at the end of each line. There are a couple ways you can achieve this:

  1. Using Split Into Lines
    1. Highlight multiple lines however you like.
    2. Use the Selection|Split Into Lines command (Cmd+Shift+L on OS X or press Cmd/Ctrl+Shift+P and type Split Into Lines) to split the multiline selection into a selection for each line.
    3. Press the right arrow by itself to reveal the cursor at the end of the selections.
  2. Using Add Selection Below
    1. Position the cursor on the line above the first line you want to select
    2. Use Selection|Add Selection Below to add as many lines with cursors as you want
    3. Use normal cursor positioning commands to place the cursors where you want