Home Download Buy Blog Forum Support

Struggling with adding a keybinding

Struggling with adding a keybinding

Postby bbeckwith on Fri Oct 28, 2011 8:22 pm

Hey guys,

I'm a complete programming noob. I've read a lot of documentation, including key bindings, commands, and plugin development, as well as tried some stuff.

Basically, what I want is a keybinding that will send the entire contents of the file in focus to an e-mail address (ideally, the address can be configred on-the-fly, but right now I'd be content to always send it to the same e-mail).

Here's the contents of my Default (OSX).sublime-keymap file:

Code: Select all
[
   { "keys": ["super+shift+alt+e"], "command": "sendEmail user@domain.com" }
]


In my implementation, user@domain.com would be replaced with the desired receiver.

So, in this scenario, ideally what I would like is:

- Press key combination CMD+SHIFT+ALT+E
- Opens default mail client to send the e-mail

Anybody have any idea what I'm doing wrong?

Thanks,

Blair
bbeckwith
 
Posts: 2
Joined: Fri Oct 28, 2011 8:18 pm

Re: Struggling with adding a keybinding

Postby adzenith on Fri Oct 28, 2011 11:10 pm

Is sendEmail the name of a plugin that you've written?
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Struggling with adding a keybinding

Postby bbeckwith on Fri Oct 28, 2011 11:33 pm

Nope, it's the name of a command I found here: http://www.sublimetext.com/docs/commands

Maybe I'm misunderstanding things terribly. Is there a way to use the commands listed there besides making keybindings? They don't seem to be in the Command Pallet.

Sorry for my uselessness.
bbeckwith
 
Posts: 2
Joined: Fri Oct 28, 2011 8:18 pm

Re: Struggling with adding a keybinding

Postby adzenith on Sun Oct 30, 2011 12:36 am

Unfortunately those commands are all from Sublime Text 1, which only runs on Windows.
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Struggling with adding a keybinding

Postby C0D312 on Sun Oct 30, 2011 12:47 am

Unfortunately, documentation for ST2 is lacking. You may want to look at [url]sublimetext.info[/url] for unofficial documentation.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 25 guests