Sagar Chamling
Sagar Chamling

Reputation: 1068

How to bind double shift [shift+shift] for quick opening files in SublimeText 3?

I am trying to achieve Intellij like double shift navigation. I found that it is called "Sequence Key Bindings" for "Quick-open files".

Hence, I added this line in .sublime-keymap --- USER

{ 
  "keys": ["shift", "shift"],  
  "command": "show_overlay", 
  "args": {"overlay": "goto", "text": "@"} 
} 

But it's not working. How can I do this?

Upvotes: 3

Views: 1108

Answers (2)

hernanBeiza
hernanBeiza

Reputation: 41

Now in Sublime Text 4, Modifier keys can be uses as part of a key binding. Sublime Text 4 Changelog

So now! 🎉

{ "keys": ["shift", "shift"], "command": "show_overlay", 
  "args": { "overlay": "goto", "text": "@" } }

Upvotes: 4

Mathieu Paturel
Mathieu Paturel

Reputation: 4510

I don't think you can do this. shift, ctrl, alt and super are modifiers. You need at least one "normal" key (non-modifier).

As an alternative, here's what you could do:

{ "keys": ["g", "g"], "command": "show_overlay", 
  "args": { "overlay": "goto", "text": "@" } }

If you never type two g at a time, then it's great, otherwise, change it :wink:

(What's going to happen is that the first g will be inserted, but if you press a second time the g, it will remove both of them and run the command)

Hope this helps!

Upvotes: 4

Related Questions