Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a multiline cursor without using a mouse in Sublime text 3?

Tags:

sublimetext

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?

like image 399
Ivan Avatar asked Oct 01 '14 14:10

Ivan


People also ask

How do I add multiple cursors in Sublime Text 3?

While you can place multiple text cursors in Sublime Text with Cmd–Click (Mac) or Ctrl–Click (Windows), here's another technique that comes in handy. Hold Ctrl–Shift (Mac) or Ctrl–Alt (Windows) and hit Up or Down Arrow to place an additional text cursor above or below the current cursor.

How do I create a multiline cursor?

To add multiple cursors at any text position This is done by using Ctrl + Click . Firstly you have to enable Multiple-Cursor Modifier. Simply type this option on Command Palette by Ctrl + Shift + P to enable it. To remove a cursor form multiple text position.

How do you select multiple lines in Sublime Text 3?

To select multiple regions using the keyboard, select a block of text, then press Ctrl+Shift+L to split it into one selection per line.


2 Answers

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.

like image 135
MattDMo Avatar answered Sep 27 '22 22:09

MattDMo


You can use Middle mouse button for this as well.

Click & Hold Middle mouse button and drag up and down

like image 24
Starx Avatar answered Sep 27 '22 23:09

Starx