Created
April 22, 2010 21:41
-
-
Save reinh/375857 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autocmd FileType markdown map <Leader>h1 :.g/.\+/copy. <Bar> s/./=/g <CR> | |
autocmd FileType markdown map <Leader>h2 :.g/.\+/copy. <Bar> s/./-/g <CR> |
And this is easier than the following or just more explicit?
is an h1
is an h2
is an h3
doh! github markdowned my markdown.
(#) = h1
(##) = h2
(###) = h3
the ---- and ==== style are similar to asciidoc and signify a header more visually than #s. YMMV.
-R
PS, this could also be done via the cunning use of vim's repeat(), but this is more leet.
PPS, you can use markdown to make markdown not markdown your markdown:
# h1
## h2
### h3
PPPS, yo dawg, I heard you like markdown.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
h1 and h2 make lines headers