From 626d3c0f7c5bc95ffcbaedafa5610623a374b02a Mon Sep 17 00:00:00 2001 From: Reed Esau Date: Mon, 10 Nov 2014 14:39:28 -0700 Subject: [PATCH 1/3] Fixed filetype on fenced code block --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 9aa426c..058940c 100644 --- a/README.markdown +++ b/README.markdown @@ -133,7 +133,7 @@ NeoBundle 'reedes/vim-pencil' Run the following in a terminal: -```vim +```bash cd ~/.vim/bundle git clone https://github.com/reedes/vim-pencil ``` From 8e8aeb74513d82e2f0365bdc9789f0f15f049a67 Mon Sep 17 00:00:00 2001 From: Reed Esau Date: Tue, 11 Nov 2014 18:14:11 -0700 Subject: [PATCH 2/3] Minor changes to iskeyword and indent settings --- autoload/pencil.vim | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/autoload/pencil.vim b/autoload/pencil.vim index 532a9b7..05883a7 100644 --- a/autoload/pencil.vim +++ b/autoload/pencil.vim @@ -275,7 +275,7 @@ fun! pencil#init(...) abort " TODO how to separate quote from apostrophe use? if b:pencil_wrap_mode aug pencil_iskeyword - au BufEnter setl isk& | setl isk-=_ | setl isk+=$,%,&,#,-,' + au BufEnter setl isk& | setl isk-=_ | setl isk+=$,%,&,#,-,',:,+ aug END el sil! au! pencil_iskeyword * @@ -286,24 +286,28 @@ fun! pencil#init(...) abort setl nolist setl wrapmargin=0 setl autoindent " needed by formatoptions=n - + setl indentexpr= if has('smartindent') setl nosmartindent " avoid c-style indents in prose en + if has('cindent') + setl nocindent " avoid c-style indents in prose + en 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 " preserve indent based on 2nd line for rest of paragraph + "setl formatoptions+=2 " preserve indent based on 2nd line for rest of paragraph " clean out stuff we likely don't want 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 - setl formatoptions-=o " don't insert comment leader + setl formatoptions-=2 " doesn't work with with fo+=n, says docs " plasticboy/vim-markdown sets these to handle bullet points " as comments. Not changing for now. + "setl formatoptions-=o " don't insert comment leader "setl formatoptions-=c " no autoformat of comments "setl formatoptions+=r " don't insert comment leader @@ -317,11 +321,15 @@ fun! pencil#init(...) abort if has('smartindent') setl smartindent< nosmartindent< en + if has('cindent') + setl cindent< nocindent< + en if has('conceal') setl conceallevel< setl concealcursor< en + setl indentexpr< setl autoindent< noautoindent< setl list< nolist< setl wrapmargin< From 9897c951ab823a5c920d3f84cfc214856ec19510 Mon Sep 17 00:00:00 2001 From: Reed Esau Date: Wed, 12 Nov 2014 06:42:15 -0700 Subject: [PATCH 3/3] Reconsidered colon for iskeyword --- autoload/pencil.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/pencil.vim b/autoload/pencil.vim index 05883a7..feef581 100644 --- a/autoload/pencil.vim +++ b/autoload/pencil.vim @@ -275,7 +275,7 @@ fun! pencil#init(...) abort " TODO how to separate quote from apostrophe use? if b:pencil_wrap_mode aug pencil_iskeyword - au BufEnter setl isk& | setl isk-=_ | setl isk+=$,%,&,#,-,',:,+ + au BufEnter setl isk& | setl isk-=_ | setl isk+=$,%,&,#,-,',+ aug END el sil! au! pencil_iskeyword *