How to delete current character as ctrl-d in emacs?


I wanna be able to delete the current character/ the one in front of cursor, and I want it to bind to ctrl-d as in emacs.
I want to add it in my ‘keymap.cson’ file so it can overwrite all other bindings of ctrl-d.

Any ideas of how I can do this? How can I possible figure out what kind of command doing what, e.g. ‘pane:show-next-item’, where do I find these?



Have you tried using the Keybinding Resolver (Cmd+. on OS X and Ctrl+. on other platforms)? It will show you what key Atom saw you press and the command that was triggered because of it.

You could use this to find out the command executed when you press Delete, then you could use that to map keys to.


Thanks, didn’t know that.
But it still doesn’t work.

This is what i putt in keymap file:

  'ctrl-d': 'unset!'
  'ctrl-d': 'core:delete'

Can I in some way super force it? :stuck_out_tongue:


The keybinding you placed in your message simply unmaps and remaps Ctrl+D to core:delete. Did you mean to use some other key? What OS are you running? Is Ctrl+D mapped to something else?


I got some mapping from emmet thats I’m trying to unmap before mapping it. Done that before for another key combination, which worked.

I’m running mac os x. And yes it is mapped for some wierd shit from emmet plugin.


You don’t need to unmap something just to map it again. What you need to do is use the selector from the Emmet keybinding and the mapping from your example above.


Here’s the selector emmet is currently using:

'.platform-darwin atom-text-editor:not([mini])':
  'ctrl-d': 'emmet:balance-outward'

So (if I understood correctly) the mapping on keymap.cson should look like:

'.platform-darwin atom-text-editor:not([mini])':
  'ctrl-d': 'core:delete'


That solved it, thank you! :slight_smile: