22

The only way to make a multiline cursor in Sublime text 3 is Ctrl+Shift+RC+Drag. Is there any way to do this without using a mouse?

5
  • @minitech not on Windows...
    – MattDMo
    Commented Oct 1, 2014 at 14:53
  • @MattDMo: It’s Ctrl+Alt+Up/Down on Windows, if I recall correctly.
    – Ry-
    Commented Oct 1, 2014 at 14:53
  • 4
    @minitech oops. Doing that just flipped my screen upside down (Win8)
    – MattDMo
    Commented Oct 1, 2014 at 14:54
  • 1
    @MattDMo: It might be Ctrl+Shift, then, but I’m sure it was Ctrl+Alt at some point, because it switched workspaces on Unity.
    – Ry-
    Commented Oct 1, 2014 at 14:56
  • @minitech OK, I fixed it. Hit Ctrl-Alt-F12 to open the Intel control panel, go to options, and either remap the screen orientation keys, or click Off and disable them all together.
    – MattDMo
    Commented Oct 1, 2014 at 14:59

7 Answers 7

35

Yes, there is. Using Shift or Shift, select the lines you want multiple cursors on. Next, hit CtrlShiftL (CommandShiftL on macOS) to split the selection into lines. Finally, hitting will put the cursors at the beginning of the lines, while will put them at the end.

Edit

There is also another, quicker way (thanks to minitech) - CtrlAlt/ will create multiple cursors without having to do selections first, and you can place the cursors anywhere in the line you wish. However, on Windows these key combos may be mapped to changing the screen orientation. To change this, hit CtrlAltF12 to open the Intel control panel, click Options, and either remap the screen orientation hotkeys, or click Off on the left side to disable all of them.

5
  • 3
    Another way is to place the cursor at the end of the first line, Shift → to select the new line character, and Ctrl D to select following new lines.
    – grc
    Commented Oct 1, 2014 at 15:06
  • @grc true, but then you have all the newlines selected, and they will be deleted as soon as you start typing.
    – MattDMo
    Commented Oct 1, 2014 at 15:08
  • You can unselect with any arrow key like you mention in your answer.
    – grc
    Commented Oct 1, 2014 at 15:10
  • The first way works but is quirky - the first line cursor didn't go to the line start in my case although the following cursors did. The second way did nothing on my system until I have disabled the Intel Graphics hot keys the way you recommend (they didn't work anyway). It seems the best way for me. @grc's suggestion works great.
    – Ivan
    Commented Oct 1, 2014 at 15:42
  • 1
    NOTE: For macOS, it is Command + Shift + L. Commented Jan 6, 2021 at 16:15
11

You can use Middle mouse button for this as well.

Click & Hold Middle mouse button and drag up and down

9

Standard key bindings not work for me(Ubuntu 16.4 and Win 10), but after redefining works good! To redefine default key bindings use (Preferences->Key Bindings)

{ "keys": ["alt+shift+down"], "command": "select_lines", "args":{"forward": true} } will add cursor below, { "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} } will add cursor above.

1
  • This works for me on window 10 on a Surface Pro. I prefer not having to use a mouse most of the time, if possible. The last answer should not be selected as the question was asking specifically about how to do it without a mouse.
    – Sarah
    Commented Jan 25, 2020 at 22:13
9

MAC: ctrl ( ^ ) + Shift + up / down arrow

ctrlShiftup arrow
ctrlShiftdown arrow

3
  • 1
    Can confirm, this works for me on macOS Mojave, where the accepted answer does not.
    – tmastny
    Commented Jun 4, 2020 at 14:17
  • 1
    this works the best
    – zman
    Commented Oct 6, 2022 at 19:11
  • This moves the line where the cursor is up and down for me. Is there a setting string to ensure what you describe is the behavior for the key chord you list?
    – ruffin
    Commented Sep 5, 2023 at 17:50
1

In Ubuntu, the accepted answer works. Also, you can do:

Shift + Alt + Key up/down

0

What works for me on a window 10 Surface Pro is

Ctrl + Alt + up/down

Because Ctrl + Alt + up/down already works for me, there is no need to do another key binding. I have it set up the same way for VS Code as well: Ctrl + Alt + up/down.

Or you can also map it as Yaroslav says (which I voted up), which works as well.

-5

It was much simpler for me than any other answers above: Just hold ctrl and click on your mouse placing it where you want to have the second or third cursor.

1
  • Hey, welcome to StackOverflow! This would be a useful answer, except that the OP said "without a mouse". Don't feel badly! Easy to delete this one and answer another. ;^D
    – ruffin
    Commented Sep 5, 2023 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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