John David Reaver
John David Reaver

Reputation: 1313

Highlight region while typing

Let's say you are about to type something that you know you want to kill-yank later. For example, say we need to repeat the following 10 times:

grid.addValue([some variable])

Currently, before I start typing, I can press C-<spc> C-<spc> to activate then deactivate the mark at the beginning of the text. Then, once I finish typing grid.addValue(), I can press C-x C-x twice to go back to the original mark, then back to the end of the text with the text highlighted.

My question: is there a way to set the mark and highlight as I type, so when I am done with the phrase I can immediately copy and yank it a bunch of times?

Upvotes: 1

Views: 80

Answers (1)

phils
phils

Reputation: 73274

Just set the mark, type, and then copy/kill as normal.

The region (i.e. whatever is between point and mark) isn't highlighted, but it's still usable.

Upvotes: 3

Related Questions