From eec3dc455eaa16e92e9eb4cd2174026b9dfa1161 Mon Sep 17 00:00:00 2001 From: Reed Esau Date: Wed, 3 Sep 2014 05:23:36 -0600 Subject: [PATCH] Ensure iskeyword is prose-oriented for buffer - fixes #15 --- autoload/pencil.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/autoload/pencil.vim b/autoload/pencil.vim index bab45d1..23a3ba6 100644 --- a/autoload/pencil.vim +++ b/autoload/pencil.vim @@ -196,6 +196,18 @@ fun! pencil#init(...) abort sil! au! pencil_cursorwrap * en + " Because syntax for fenced code blocks will mess with the + " definition of a word (via iskeyword) we'll impose a prose- + " oriented definition. + " e.g., let g:markdown_fenced_languages = ['sh',] " adds '.' + if b:pencil_wrap_mode + aug pencil_iskeyword + au BufEnter setl isk& | setl isk-=_ + aug END + el + sil! au! pencil_iskeyword * + en + " window/buffer settings if b:pencil_wrap_mode setl nolist