aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/text
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/ftplugin/text')
-rw-r--r--vim/after/ftplugin/text/spell.vim16
1 files changed, 9 insertions, 7 deletions
diff --git a/vim/after/ftplugin/text/spell.vim b/vim/after/ftplugin/text/spell.vim
index 322090ca..73ca5486 100644
--- a/vim/after/ftplugin/text/spell.vim
+++ b/vim/after/ftplugin/text/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_text_spell') || &compatible
finish
endif
+if !has('spell')
+ finish
+endif
let b:did_ftplugin_text_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