Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Sublime Text, I know Command + D selects the current word and the next occurrence of it when you press the shortcut again.

What I'm searching for is a Sublime Text 3 plugin that assigns the following behavior to a keyboard shortcut:

  1. First shortcut press, selects the current word (Exactly as Command + D does)
  2. Second shortcut press, expands the selection to also include the next word (whatever that word is)

In short, I'm trying to simplify the following:

  • Command + D (To select current word)
  • Alt + Shift + Right arrow to expand selection so it includes the next word
share|improve this question
  1. Go to Preferences → Key Bindings ‐ User.
  2. Add below lines to just opened file between [ and ].
    { "keys": ["f1"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true}},
    { "keys": ["f1"], "command": "find_under_expand", "context":
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
  3. Change f1 to any other shortcut key, if you want.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .