From a0d2ae3cc361a40a74e0b3602dc47bbfce0c2fdb Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 13 Feb 2012 20:33:37 -0600 Subject: [PATCH] Auto wrap reStructuredText files. Tweak rST key mappings --- ftplugin/rst.vim | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ftplugin/rst.vim b/ftplugin/rst.vim index 87cde23..04f99d1 100644 --- a/ftplugin/rst.vim +++ b/ftplugin/rst.vim @@ -1,5 +1,9 @@ -nnoremap ,t :t.s/./=/gt-2:noh -nnoremap ,1 :t.s/./=/g:noh -nnoremap ,2 :t.s/./*/g:noh -nnoremap ,3 :t.s/./+/g:noh -nnoremap ,4 :t.s/./-/g:noh +" Wrap lines at 80 characters +setlocal textwidth=79 + +" Title and heading key mappings +inoremap ,t :t.s/./=/gt-2:nohj2A +inoremap ,1 :t.s/./=/g:nohA +inoremap ,2 :t.s/./*/g:nohA +inoremap ,3 :t.s/./+/g:nohA +inoremap ,4 :t.s/./-/g:nohA