- You create multiple columns and then just use ctrl+left and ctrl+right to increase each column
- I made a small plugin to not only add a caret but a whole selection. Select Tools > Developer > New Plugin… and paste this:
import sublime
import sublime_plugin
def _get_point(view, point, forward):
delta = 1 if forward else -1
row, col = view.rowcol(point)
new_row = row + delta
new_point = view.text_point(new_row, col)
# if we moved beyond the line end, move to the end of the line
if view.rowcol(new_point)[0] != new_row:
new_point = view.text_point(new_row + 1, 0) - 1
return new_point
class AddSelectionCommand(sublime_plugin.TextCommand):
def run(self, edit, forward=True, only_caret=True):
view = self.view
if not len(view.sel()):
return
sel = view.sel()[-1 if forward else 0]
row, col = view.rowcol(sel.b)
point_b = _get_point(view, sel.b, forward)
if only_caret:
point_a = point_b
else:
point_a = _get_point(view, sel.a, forward)
new_sel = sublime.Region(point_a, point_b)
view.sel().add(new_sel)
Afterwards create a keybinding:
{
"keys": ["ctrl+alt+down"],
"command": "add_selection",
"args": {
"forward": true,
"only_caret": false
}
},
{
"keys": ["ctrl+alt+up"],
"command": "add_selection",
"args": {
"forward": false,
"only_caret": false
}
},