Restructured text (ReST) is a plaintext markup format. I find it great for documentation and note-taking, and it plays nice with revision control, such as git.
One thing that gets a little tedious is underlining for sections. When you create a section title, the number of (nonalphanumeric 7-bit ASCII) characters underlining the title must match the number of characters in the title. For example, a section called "My Section" would need 10 "-" on the next line, assuming you're using dashes.
Using vim as an editor, you have three options for inserting the dashes. You could:
<esc>10i-<esc> (insert ten dashes).
(Naturally, it should be defined in your vimrc file)
function ReST_Extend_Line()
let cur = getline(".")
let prev = getline( line(".") - 1 )
return repeat(cur[0], len(prev) - len(cur))
endfunction
You'll need to bind this to something in insert mode. I have mine bound to ^L. Yes, I know that is generally used to redraw the screen, but it works for me.
imap <c-l> <c-r>=ReST_Extend_Line()<cr><cr>
Now, after entering a section heading, I move to the next line, type the character I want for the underline, and type ^L. Presto! The heading is now underlined. This really does extend the line. So, if you made the title longer, went down to the next line and ran the function, it would fill out the rest of the line to the appropriate length.
It's a little bit simpler to do "yypVr-" in my opinion (I got this from Jeff Anderson).