0

In Vim, I can do this trick on a line with the words "People":

yy p Shift-v r +

It will produce a set of lines that like this:

People

++++++

I would like to be able to reproduce this in Emacs if possible.

  • 2
    Many/most people on this site will not understand the Vim commands you cite. Please explain what they do. – Dan Jan 16 at 14:55
  • You might try evil-mode: github.com/emacs-evil/evil – Lorem Ipsum Jan 16 at 15:34
  • yy is copy a line, p is paste it below, shift-v is select the pasted line, r is replace the selected text with + – devcom Jan 16 at 18:35
4

Use C-M-% (query-replace-regexp) to replace the pattern . with + in the region (In Emacs regexp, . matches any characters except newline).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.