diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-03 16:30:38 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-03 16:30:38 +1200 |
commit | 1fe646dbf7e453a8c230bee6752d5ba83e5b7f5b (patch) | |
tree | a355ec4dca97714d0b61a326a435493320bcb73e /vim/after/ftplugin/markdown/spell.vim | |
parent | Merge branch 'release/v0.43.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-0.44.0.tar.gz (sig) dotfiles-0.44.0.zip |
Merge branch 'release/v0.44.0'v0.44.0
* release/v0.44.0:
Bump VERSION
Correct logic of Markdown/text spell checking
Vim ftplugin: hold autoformat in *.md code blocks
Remove accidentally committed ";" file
Diffstat (limited to 'vim/after/ftplugin/markdown/spell.vim')
-rw-r--r-- | vim/after/ftplugin/markdown/spell.vim | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/vim/after/ftplugin/markdown/spell.vim b/vim/after/ftplugin/markdown/spell.vim index bb344374..05fc7c00 100644 --- a/vim/after/ftplugin/markdown/spell.vim +++ b/vim/after/ftplugin/markdown/spell.vim @@ -1,8 +1,12 @@ " Only do this when not done yet for this buffer -" Also do nothing if 'compatible' enabled +" Also do nothing if 'compatible' enabled, or if the 'spell' feature isn't +" available if exists('b:did_ftplugin_markdown_spell') || &compatible finish endif +if !has('spell') + finish +endif let b:did_ftplugin_markdown_spell = 1 if exists('b:undo_ftplugin') let b:undo_ftplugin = b:undo_ftplugin @@ -10,10 +14,8 @@ if exists('b:undo_ftplugin') endif " Spellcheck documents by default -if has('syntax') - setlocal spell - if exists('b:undo_ftplugin') - let b:undo_ftplugin = b:undo_ftplugin - \ . '|setlocal spell<' - endif +setlocal spell +if exists('b:undo_ftplugin') + let b:undo_ftplugin = b:undo_ftplugin + \ . '|setlocal spell<' endif |