Created
August 3, 2010 14:15
-
-
Save swaroopch/506442 to your computer and use it in GitHub Desktop.
Making it easy to create headings in ReStructuredText syntax, in Vim
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
if has('ruby') | |
function! Heading(char) | |
ruby <<EOF | |
buffer = VIM::Buffer.current | |
new_line = VIM::evaluate("a:char") * buffer.line.length | |
buffer.append(buffer.line_number, new_line) | |
EOF | |
endfunction | |
command H1 call Heading('=') | |
command H2 call Heading('-') | |
command H3 call Heading('~') | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment