Quickly create reStructuredText overlines (and underlines) in Vimยง
I format H1-level section titles in reStructuredText with an overline and underline, like this:
=============
Hello, world!
=============
The sequence of = characters above Hello, world! is the overline, and
the sequence below is the underline.
To quickly create overlines and underlines in Vim:
Write the H1-level section title text.
Hello, world!
Yank the line with
yyand then duplicate it withp.Hello, world! Hello, world!
Press
Vr=to create the underline.Hello, world! =============
Yank the underline with
yythen presskkto move up 2 lines thenpto paste.============= Hello, world! =============