Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you cycle through multiple cursors in Sublime Text like you would with placeholders?

Tags:

sublimetext2

Is there a way to tab through multiple cursors like you can with placeholders?

Sublime Text 2 multiple carets

Having those cursors placed you would:

  1. type "index"
  2. tab
  3. type "products"
  4. tab
like image 224
fregante Avatar asked May 30 '13 14:05

fregante


2 Answers

You could create bookmarks with the multiple cursors (ctrl+f2 or cmd+f2 by default I think). Then, you could return to a single cursor (escape). After you enter the content on a particular line, you could then move to the next bookmark (f2 by default). Of course, those are with the default keybindings. You can always rebind them to something more comfortable than f2.

like image 88
skuroda Avatar answered Oct 22 '22 16:10

skuroda


There is a plugin for that and more. https://packagecontrol.io/packages/MultiEditUtils

You can add this line to your User Keybindings for custom hotkey:

{ "keys": ["alt+d"], "command": "selection_fields" },
like image 21
FIIFE Avatar answered Oct 22 '22 14:10

FIIFE