aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/markdown/autoformat.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/vim/after/ftplugin/markdown/autoformat.vim b/vim/after/ftplugin/markdown/autoformat.vim
index 9a963fbb..8e476158 100644
--- a/vim/after/ftplugin/markdown/autoformat.vim
+++ b/vim/after/ftplugin/markdown/autoformat.vim
@@ -13,6 +13,10 @@ if exists('b:undo_ftplugin')
\ . '|unlet b:did_ftplugin_markdown_autoformat'
endif
+" Turn on autoformatting if the buffer has no code-block lines with spaces
+" that is longer than 'textwidth'
+call ftplugin#markdown#autoformat#Load()
+
" Suspend auto-formatting when in a code block (four-space indent)
autocmd BufWinEnter,CursorMoved,CursorMovedI,WinEnter
\ <buffer>