A character string like:
string1_string2_string3
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.
Try C-M-k, which is
kill-sexp. Similarly, you can move around with C-M-f and C-M-b (bound toforward-sexpandbackward-sexprespectively).Or make the change proposed for a solution to this related question.