Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an Emacs-analog for the VI '.' command to repeat-last-typed-text

Tags:

emacs

I've used emacs for decades and always wondered, but kept on coding, if there was a way to type in something, them move the cursor and insert the same text, like the VI . command.

Instead what I do is to type the text, set the mark, backup, copy the region, go to the next spot (often just C-n, down one line) and then pre-arg yank, C-u C-y.

It's the overhead of set mark, backup and copy region that makes me just go ahead and retype the thing.

like image 772
Don Avatar asked Jun 11 '10 00:06

Don


1 Answers

Download dot-mode.el from the emacs wiki.

After installing and byte-compiling this, you'll be able to type control-dot for what you want.

Enjoy :-)

like image 174
DenverCoder9 Avatar answered Sep 21 '22 10:09

DenverCoder9