Sublime Forum

Struggling with adding a keybinding

#1

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:

{ "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

0 Likes

#2

Is sendEmail the name of a plugin that you’ve written?

0 Likes

#3

Nope, it’s the name of a command I found here: 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.

0 Likes

#4

Unfortunately those commands are all from Sublime Text 1, which only runs on Windows.

0 Likes

#5

Unfortunately, documentation for ST2 is lacking. You may want to look at sublimetext.info for unofficial documentation.

0 Likes