Search code examples
vimrestructuredtext

How to input hyphen as many as the number of characters in the line above?


I want to input specific character as many as the number of characters in the line above.

Before:

FooBar

After:

FooBar
------

I want to use this function to write reStructuredText


Solution

  • yypVr-
    

    Yank the line, paste it, then change every character to a dash.