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


by tednaleid ST2/ST3

Sublime Text 2 plugin to quickly jump to any character in the visible area of the active view.


  • 2 2015.
    3 2014.
  • github.​com
  • github.​com
  • 4 weeks ago
  • 54 minutes ago
  • 3 years ago


  • Total 12K
  • Win 5K
  • OS X 5K
  • Linux 2K
Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 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
Windows 8 5 13 10 10 14 11 9 9 10 15 6 5 8 7 8 4 4 13 12 7 8 5 8 12 8 11 12 14 8 4 14 7 9 4 10 5 5 7 4 6 12 3 10 7 12
OS X 8 1 1 2 6 7 9 7 4 5 6 5 7 3 4 1 3 2 11 5 8 6 6 5 6 9 4 5 3 3 5 8 6 7 6 8 2 2 3 1 8 7 7 2 0 8
Linux 1 5 2 5 6 3 3 4 3 3 7 1 4 2 9 5 4 3 3 4 1 7 2 4 5 6 4 3 2 2 4 4 4 4 4 6 4 2 4 1 4 3 2 4 4 5



Sublime EasyMotion

EasyMotion is a Sublime Text 2 plugin that allows you to move the cursor to any character in your current view.

It's heavily inspired by Vim's EasyMotion, and Emacs' AceJump plugins.

After pressing the EasyMotion shortcut (default cmd-;/ctrl-;), you then press the character that you'd like to jump to. EasyMotion will then replace all currently visible instances of that character with one of a-zA-Z0-9. Press the key for the one you want and your cursor will be moved right to it.

Here I'm pressing cmd-; followed by f. EasyMotion highlights the 6 visible “f” characters with a-f. I then press d to jump to the beginning of the function.

Animated Gif


Install via PackageControl

If you have the PackageControl plugin installed, you can use that to install EasyMotion.

Just type cmd-shift-p (ctrl-shift-p on win/linux) to bring up the command pallate then type install and pick Package Control: Install Package from the dropdown.

Then type EasyMotion and choose the EasyMotion plugin from the dropdown. Hit enter and it will install.

Manual Installation

Manual installation should be as easy as cloning this git repository into your Sublime Packages directory. On OSX:

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/tednaleid/sublime-EasyMotion.git EasyMotion

(The directory name underneath packages must be EasyMotion and not sublime-EasyMotion for some preferences to get picked up)

If you're interested in trying the next release of the plugin, you can switch your branch to the development branch:

cd EasyMotion
git checkout development

This branch will have features that are marked as fixed in the issue, but haven't yet been merged to master.

Sublime Text 3 Experimental Support

This is not supported, and there are no plans for adding any further support in the future. For ST3, I'd suggest looking at the AceJump plugin.

There is experimental support for Sublime Text 3 on the st3 branch that requires manual installation and the use of the st3 branch.

cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
git clone git://github.com/tednaleid/sublime-EasyMotion.git EasyMotion
cd EasyMotion
git checkout st3


Jump to any visible character

cmd-;   <character>   // OSX
ctrl-;  <character>   // Linux/Windows

it will label all instances of that character with a unique value in a-zA-Z0-9, type the label you want and it will jump you to it.


The cursor is at the end of the file and we want to jump to the beginning of the realpart variable on line 3

EasyMotion Begin

Instead of hitting the up arrow twice and scrolling over to the r (or grabbing your mouse), you could press cmd-; followed by r. That will transform your file into this (notice that each instance of r has been turned into one of a-zA-Z0-9):

EasyMotion Middle

Press e and your cursor will jump right there:

EasyMotion Middle

If your target character occurs more than 62 times in the visible area, it will decorate them in batches.

So if we search this for the letter l using cmd-;+l

Many Matches Start

The first batch of 62 targets will look like this:

Many Matches First

Just hit enter and it will highlight the next group of matches.

Many Matches Second

Keep hitting enter and it will continue to cycle through them in groups of 62. You can also hit shift-enter to cycle backwards through the target groups. Hitting the spacebar will exit, and so will ctrl-c and escape (but for some reason there's currently a bug that makes you hit those twice to exit).

Select all text between cursor and any visible character

cmd-shift-;  <character>  // OSX
ctrl-shift-; <character>  // Linux/Windows

it will label all instances of that character with a unique value in a-zA-Z0-9, type it and it will select all text between your current cursor position and the chosen jump target.


So in the same situation as above, if we had hit cmd-shift-; followed by r and picked the e target that occurs at the start of the imagpart variable on line 3, we would end up with this:

EasyMotion Select

User Modifiable Preferences

Remapping the Sublime EasyMotion keyboard shortcut

You can remap your keys to be something other than the defaults by entering an override value into your “User - KeyBindings” (under Sublime Text 2 -> Preferences -> Package Settings -> Easy Motion on OSX), just make sure to copy the existing key bindings exactly and change only the first item in the keys stanza, otherwise it won't work. So if you wanted the jump command to be ctrl-,, you'd use:

        "keys": ["ctrl+,", "<character>"], 
        "command": "easy_motion",
        "args": {"select_text": false} 
        "keys": ["ctrl+shift+,", "<character>"], 
        "command": "easy_motion",
        "args": {"select_text": true} 

Overriding the placeholder characters used for jumping

Add this to your “User Settings” file (found at “Sublime Text 2 -> Preferences -> Package Settings -> Easy Motion -> Settings - User” on OSX) and change the string to contain whatever characters you'd like to use:

// define the characters that we can jump to, in the order that they'll appear, they should be unique
"placeholder_chars" : "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"

example using only QWERTY home-row replacements:

"placeholder_chars" : "jkl;asdfHGJKL:ASDFHG"

Override the highlight color for jump targets

If the highlight color used for jump targets isn't bold enough if your color scheme, you can override it by changing this “User Setting”:

// defines syntax highlighting scope that will be used to highlight matched jump targets
// other examples include: keyword, string, number
"jump_target_scope" : "entity.name.class"


  • 0.8 - released 2/3/13 - updates location of preferences to EasyMotion specific file and includes plugin specific preferences file. You'll need to migrate preferences over into this file for them to stick.
  • 0.9 - released 2/14/13 - removes need for input panel and implements an easy_motion_mode to accept keystrokes, also lets shift-enter cycle backwards
  • 1.0 - released 2/1/14 - when in insert mode (not vim command mode) will put the cursor on the right of the chosen letter, not the left