This commit is contained in:
Reed Esau
2014-11-12 14:35:42 -07:00
2 changed files with 13 additions and 5 deletions

View File

@@ -133,7 +133,7 @@ NeoBundle 'reedes/vim-pencil'
Run the following in a terminal: Run the following in a terminal:
```vim ```bash
cd ~/.vim/bundle cd ~/.vim/bundle
git clone https://github.com/reedes/vim-pencil git clone https://github.com/reedes/vim-pencil
``` ```

View File

@@ -276,7 +276,7 @@ fun! pencil#init(...) abort
" TODO how to separate quote from apostrophe use? " TODO how to separate quote from apostrophe use?
if b:pencil_wrap_mode if b:pencil_wrap_mode
aug pencil_iskeyword aug pencil_iskeyword
au BufEnter <buffer> setl isk& | setl isk-=_ | setl isk+=$,%,&,#,-,' au BufEnter <buffer> setl isk& | setl isk-=_ | setl isk+=$,%,&,#,-,',+
aug END aug END
el el
sil! au! pencil_iskeyword * <buffer> sil! au! pencil_iskeyword * <buffer>
@@ -287,24 +287,28 @@ fun! pencil#init(...) abort
setl nolist setl nolist
setl wrapmargin=0 setl wrapmargin=0
setl autoindent " needed by formatoptions=n setl autoindent " needed by formatoptions=n
setl indentexpr=
if has('smartindent') if has('smartindent')
setl nosmartindent " avoid c-style indents in prose setl nosmartindent " avoid c-style indents in prose
en en
if has('cindent')
setl nocindent " avoid c-style indents in prose
en
setl formatoptions+=n " recognize numbered lists setl formatoptions+=n " recognize numbered lists
setl formatoptions+=1 " don't break line before 1 letter word setl formatoptions+=1 " don't break line before 1 letter word
setl formatoptions+=t " autoformat of text (vim default) 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 " clean out stuff we likely don't want
setl formatoptions-=v " only break line at blank entered during insert setl formatoptions-=v " only break line at blank entered during insert
setl formatoptions-=w " avoid erratic behavior if mixed spaces setl formatoptions-=w " avoid erratic behavior if mixed spaces
setl formatoptions-=a " autoformat will turn on with Insert in HardPencil mode 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 " plasticboy/vim-markdown sets these to handle bullet points
" as comments. Not changing for now. " as comments. Not changing for now.
"setl formatoptions-=o " don't insert comment leader
"setl formatoptions-=c " no autoformat of comments "setl formatoptions-=c " no autoformat of comments
"setl formatoptions+=r " don't insert comment leader "setl formatoptions+=r " don't insert comment leader
@@ -318,11 +322,15 @@ fun! pencil#init(...) abort
if has('smartindent') if has('smartindent')
setl smartindent< nosmartindent< setl smartindent< nosmartindent<
en en
if has('cindent')
setl cindent< nocindent<
en
if has('conceal') if has('conceal')
setl conceallevel< setl conceallevel<
setl concealcursor< setl concealcursor<
en en
setl indentexpr<
setl autoindent< noautoindent< setl autoindent< noautoindent<
setl list< nolist< setl list< nolist<
setl wrapmargin< setl wrapmargin<