For some reason or another I often divide the code into subsections separated by headers like these:
################################################################################
#################################### LOAD ######################################
################################################################################
These are 3 80-column wide lines of #
with a title centered in the middle.
So far I haven't find a quick way to generate these in vim.
What I usually do is something along the lines of 80i#
and then yypp
to give me 3 lines, but then I need to navigate to the middle and add text. I usually do this with replace, but replace does not center the header inside #
…#
So I delete the excess of #
's manually.
How to center the text in the middle row? And what would be a faster way to achieve this result?