Skip to content

Instantly share code, notes, and snippets.

@andrewmcdonough
Created February 11, 2010 11:57
Show Gist options
  • Save andrewmcdonough/301454 to your computer and use it in GitHub Desktop.
Save andrewmcdonough/301454 to your computer and use it in GitHub Desktop.
# Add these two lines to your .vimrc to get shortcuts h1 and h2 to create markdown headers with a nice length.
# Works by coping and pasting the current line, then substituting any character with a = (for h1) or - (for h2)
:map h1 yyp:s/./=/g<ENTER>
:map h2 yyp:s/./-/g<ENTER>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment