Home Download Buy Blog Forum Support

Multiple keyboard shortcuts

Multiple keyboard shortcuts

Postby kakubei on Mon Sep 26, 2011 10:59 am

Hello, is it possible to have multiple keyboard shortcuts for the same command? I'd like to mimic the Textmate shortcuts, specifically the Go To function shortcut (Shift-cmd-T) but I don't want to overwrite the existing cmd-R shortcut, just add it. Looking at the sublime.keymap file I see the syntax is as follows:


Code: Select all
      
{ "keys": ["super+r", "super+shift+t"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },

But this doesn't work, it only uses the last one.

What is the proper way to do it?

Thanks.
kakubei
 
Posts: 58
Joined: Sun Sep 25, 2011 9:19 am

Re: Multiple keyboard shortcuts

Postby kakubei on Wed Sep 28, 2011 11:11 am

Along these lines, how do I recreate the Textmate shortcuts where Ctrl-Cmd-right (arrow) would move your current selection to the right. I'd like to actually move the selection by words (not characters as Textmate used to do).

Looking at the keyboard shortcuts file I see that the up and down arrows work, but with a value of 1.0 and -1.0 respectively, but how to get the selection to move left and right?

Thanks.

PS
Nobody has any idea about multiple keyboard shortcuts? It seems that now if I have more than one shortcut (see above post) neither will work. Anyone seeing this on OS X?
I'm using build 2125
kakubei
 
Posts: 58
Joined: Sun Sep 25, 2011 9:19 am

Re: Multiple keyboard shortcuts

Postby mbond on Wed Sep 28, 2011 11:42 am

I've asked this same question before, and have been completely ignored.

Asked it via twitter as well.

I want to do it for searching. Mimic Emacs and Textmate's search with ctrl+s. Incremental find doesn't work the same way. Find would, if you could get it working off the same key.

My Thread: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=2570

This is, i believe, the last hurdle for me switching to Sublime Text ... but, i'm pretty sure this isn't going to happen so I'm likely going to switch back to Emacs. I've been using emacs, or emacs like editors, for 16 years. That's too much muscle memory for something that i use constantly, all day long, to have to relearn.
mbond
 
Posts: 35
Joined: Thu Feb 03, 2011 3:49 pm

Re: Multiple keyboard shortcuts

Postby bizoo on Wed Sep 28, 2011 12:08 pm

kakubei wrote:Hello, is it possible to have multiple keyboard shortcuts for the same command? I'd like to mimic the Textmate shortcuts, specifically the Go To function shortcut (Shift-cmd-T) but I don't want to overwrite the existing cmd-R shortcut, just add it. Looking at the sublime.keymap file I see the syntax is as follows:


Code: Select all
      
{ "keys": ["super+r", "super+shift+t"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },

But this doesn't work, it only uses the last one.

What is the proper way to do it?

Thanks.

Code: Select all
      
{ "keys": ["super+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["super+shift+t"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} }

didn't work ?

Code: Select all
["super+r", "super+shift+t"]

is a sequence.
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Multiple keyboard shortcuts

Postby kakubei on Thu Sep 29, 2011 8:44 am

@bizoo: ah so it's a sequence! Wasn't sure. What I ended up doing was copy/paste the same command into the users key bindings with different keys, that seemed to respect both the original and the new one.

Thanks for clarifying.

@mbond:

Yes, the find behavior is very strange to me. Even though I have wrap selected, it always fails to find anything when I'm near the end of the document, even obvious matches, don't know what's happening there. And I'd also like to see the ctrl-f behavior from Emacs. Let's give it some time, still in beta and Jon makes changes almost daily. I believe this will be the best editor for Mac once it's polished.
kakubei
 
Posts: 58
Joined: Sun Sep 25, 2011 9:19 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 10 guests