Alt-Backspace incorrectly deletes right instead of left on Mac #262

nicknotfound opened this Issue Nov 29, 2011 · 1 comment


None yet
2 participants

The keymap.macDefault key bindings have an incorrect entry in them. Pressing Option+Backspace (Alt-Backspace) should delete from the cursor position to the beginning of the word, but it instead deletes from the cursor position to the end of the word.

I was able to fix this by changing "Alt-Backspace": "delWordRight" to "Alt-Backspace": "delWordLeft".

If I can get a spare hour or two soon, I'm going to attempt to add a binding for Ctrl-Backspace and Ctrl-Delete to match the behavior in TextMate, which is somewhat of a "smart delete" as it handles underscore_words and camelCaseWords (where pressing Ctrl+Backspace with the cursor at the end of those two samples would result in underscore_ and camelCase). This may be more difficult than I think, but I'm going to give it a try.


@marijnh marijnh closed this in 8e433a2 Nov 29, 2011


marijnh commented Nov 29, 2011

If it ends up as a small modification to moveH, I'd welcome such a patch in the core. It it ends up as a lot of code, I'd prefer it as a lib/util/ script that assigns to CodeMirror.commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment