I'm using Mac, and the good thing about it is that the emacs key is mapped so that I can use 'Ctrl-A' for going first column line, and 'Ctrl-E' for last and on.

The thing is that for 'Ctrl-K', it doesn't delete one line, instead it makes code format for the current line.

  • What's the command for deleting one line in the SO editor?
  • Can I reassign the key by any way? I guess it's not possible, but I just ask.

2 Answers 2


The markdown editor doesn't have a "delete line" key.

You just have to select the line and press Delete. Or Del, if your keyboard swings that way.


I am also frustrated by the way StackOverflow attaches itself to keyboard shortcuts that Mac would ordinarily use. For example I am in Safari right now. If I decide I want to give up on this post and quit Safari, I type Command-Q.

Oh wait... what's this? Why am I in a blockquote now? No JavaSCript should be able to override a Command-Q (Quit) keyboard action!

Looks like it's affecting the Emacs-style line editing built into OS X also. I think the best solution here is a userscript... (unless the team is wiling to fix it, which I think they have said they are not)

If a userscript is possible, I'm not sure. I'll investigate and update my answer.

  • As an aside: it seems that in Safari the editor only binds to Command shortcuts that were already known for other usage. Like indeed Command-Q and Command-L. But not Command-B and Command-I for bold and italic. (But they are mapped in Chrome and Firefox. But in all browsers on a Mac, Ctrl-B and Ctrl-I work just fine too. No need for also mapping Command at all, for me. Keyboard Shortcut for formatting posts on Mac should support ⌘ — or should it?)
    – Arjan
    Feb 18, 2011 at 23:20
  • And, of course, the real life example is the Boss Button, Command-H ;-)
    – Arjan
    Feb 18, 2011 at 23:27
  • Thanks @Arjan I knew I had discussed this somewhere before quite recently Feb 18, 2011 at 23:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .