From b08f811bb22a45447e33ced118068ee0c1a3884f Mon Sep 17 00:00:00 2001 From: Reed Esau Date: Tue, 24 Jun 2014 02:42:53 -0600 Subject: [PATCH] as undo point; no comment leaders; misc doc changes --- README.markdown | 2 +- autoload/pencil.vim | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index 60ba391..f9b73c7 100644 --- a/README.markdown +++ b/README.markdown @@ -93,7 +93,7 @@ let g:pencil#wrapModeDefault = 'hard' " or 'soft' augroup pencil autocmd! - autocmd FileType markdown call pencil#init() + autocmd FileType markdown,mkd call pencil#init() autocmd FileType textile call pencil#init() autocmd FileType text call pencil#init({'wrap': 'hard'}) augroup END diff --git a/autoload/pencil.vim b/autoload/pencil.vim index 5cfc536..47273c8 100644 --- a/autoload/pencil.vim +++ b/autoload/pencil.vim @@ -174,14 +174,16 @@ function! pencil#init(...) abort setlocal autoindent " needed by formatoptions=n setlocal formatoptions+=n " recognize numbered lists setlocal formatoptions+=1 " don't break line before 1 letter word - setlocal formatoptions+=t " autoformat of text - setlocal formatoptions+=c " autoformat of comments + setlocal formatoptions+=t " autoformat of text (vim default) + setlocal formatoptions+=c " autoformat of comments (vim default) " clean out stuff we likely don't want setlocal formatoptions-=2 " use indent of 2nd line for rest of paragraph setlocal formatoptions-=v " only break line at blank entered during insert setlocal formatoptions-=w " avoid erratic behavior if mixed spaces setlocal formatoptions-=a " autoformat will turn on with Insert in HardPencil mode + setlocal formatoptions-=r " don't insert comment leader + setlocal formatoptions-=o " don't insert comment leader else setlocal autoindent< noautoindent< setlocal list< nolist< @@ -245,6 +247,7 @@ function! pencil#init(...) abort inoremap : :u inoremap u inoremap u + inoremap u else silent! iunmap . silent! iunmap ! @@ -254,6 +257,7 @@ function! pencil#init(...) abort silent! iunmap : silent! iunmap silent! iunmap + silent! iunmap endif endfunction