I very often encounter the problem that I have to cut out a part of an expression and need to copy it somerhere else. For example the following python line:
courtage_text = data["expose"]["brokerage"]["courtage"]["text"].lower()
What I want to do is cut out
data["expose"]["brokerage"]["courtage"]["text"]
What I do very often is to move the point to the beginning of what I want to cut out and then do M-f
a couple times to move where I want and then C-w
Is there a faster way of selecting what I want? I think this is a common problem and relevant to other languages as well.
avy
andexpand-region
.C-M-f
/C-M-b
) is slightly more accurate than moving by words (e.g.M-f
/M-b
) in such cases.M-z .
is the fastest, as @tripleee has commented below.expand-region
works very well and is very fast.