From 403163f85d7596aa19b6e9e2c00cffc4faf54c99 Mon Sep 17 00:00:00 2001 From: Reed Esau Date: Sun, 31 Aug 2014 18:34:56 -0600 Subject: [PATCH] Preserve indent based on 2nd line, fixes #13 I think this mostly applies to HardPencil mode. --- autoload/pencil.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/pencil.vim b/autoload/pencil.vim index 0dde423..2cd858f 100644 --- a/autoload/pencil.vim +++ b/autoload/pencil.vim @@ -205,9 +205,9 @@ fun! pencil#init(...) abort setl formatoptions+=n " recognize numbered lists setl formatoptions+=1 " don't break line before 1 letter word setl formatoptions+=t " autoformat of text (vim default) + setl formatoptions+=2 " use indent of based on 2nd line for rest of paragraph " clean out stuff we likely don't want - setl formatoptions-=2 " use indent of 2nd line for rest of paragraph setl formatoptions-=v " only break line at blank entered during insert setl formatoptions-=w " avoid erratic behavior if mixed spaces setl formatoptions-=a " autoformat will turn on with Insert in HardPencil mode @@ -234,6 +234,7 @@ fun! pencil#init(...) abort setl conceallevel< setl concealcursor< en + setl iskeyword< en if b:pencil_wrap_mode ==# s:WRAP_MODE_SOFT