Take the 2-minute tour ×

This question already has an answer here:

A character string like:


is not considered as a word in emacs.

Deleting one "word" from the start point only deletes "string1". How can I delete to the end of "string3" from "string1" or vice versa? The same problem occurs when moving forward or backward.

share|improve this question
Related: stackoverflow.com/questions/1545851/… –  Rob Hruska Dec 8 '11 at 14:08
add comment

marked as duplicate by Trey Jackson, Francesco, legoscia, Gordon Gustafson, Praveen Mar 6 at 9:44


2 Answers

up vote 3 down vote accepted

Try C-M-k, which is kill-sexp. Similarly, you can move around with C-M-f and C-M-b (bound to forward-sexp and backward-sexp respectively).

Or make the change proposed for a solution to this related question.

share|improve this answer
Thanks a lot :-) –  louxiu Dec 9 '11 at 2:31
add comment

You could just hit M+d three times instead of one.

share|improve this answer
add comment
