ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Jump​To

Sublime Text plugin to move (multiple) cursors

Details

Installs

  • Total 3K
  • Win 1K
  • Mac 844
  • Linux 448
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12
Windows 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1
Mac 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Summary

JumpTo is a plugin for Sublime Text to move the cursor to any position in the current line. It's very similar to some movement commands in Vim. This is especially useful when editing multiple similar lines at the same time with multiple selections.

Watch this video to see a real world example on how I use it to refactor some code.

Install

  1. Install Package Control.
  2. In the Command Palette, select Package Control: Install Package.
  3. Select JumpTo.
  4. Create keymaps for the commands (see Example.sublime-keymap for a suggestion).

Usage

The package does not define key bindings by default, so you must add them on your own.

With the bindings shown in Example.sublime-keymap, you can use it like follows:

  • Press ctrl+e (or select on Goto -> Jump to) and enter a search string. The cursor will jump to the start of the first occurrence of this search string.

  • Press ctrl+shift+e (or select on Selection -> Expand Selection to …) to select all characters from the current cursor position to the first occurrence of the search string.

Options

  • extend: Extend the current selection until the search result.
  • create_new: Whether the current caret(s) should stay and a new caret should be created at the target position.
  • whole_match: Whether the command should result in a selection from the matched text instead of a single caret at the start of the match.