diff --git a/.vimrc b/.vimrc
index bb38edb..a35b67f 100644
--- a/.vimrc
+++ b/.vimrc
@@ -86,3 +86,16 @@ nnoremap <Leader>da :execute "!open http://api.drupal.org/".shellescape(expand("
 nnoremap <Leader>dda :execute "!open http://api.drush.ws/api/function/".shellescape(expand("<cword>"), 1)<CR>
 " Get the value of the drupal variable under cursor.
 nnoremap <Leader>dv :execute "!drush vget ".shellescape(expand("<cword>"), 1)<CR>
+
+" Format comments, including documentation blocks.
+setl textwidth=80	" Limit comment lines to 80 characters.
+setl formatoptions-=t " Do not apply 'textwidth' to code.
+setl formatoptions+=croql
+"  -c:  Apply 'textwidth' to comments.
+"  -r:  Continue comments after hitting <Enter> in Insert mode.
+"  -o:  Continue comments after when using 'O' or 'o' to open a new line.
+"  -q:  Format comments using q<motion>.
+"  -l:  Do not break a comment line if it is long before you start.
+setl comments=sr:/**,m:*\ ,ex:*/,://
+"  Format comment blocks.  Just type / on a new line to close.
+"  Recognize // (but not #) style comments.
