diff options
Diffstat (limited to 'vim/after/ftplugin/text.vim')
-rw-r--r-- | vim/after/ftplugin/text.vim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vim/after/ftplugin/text.vim b/vim/after/ftplugin/text.vim index cd35231e..06ca464a 100644 --- a/vim/after/ftplugin/text.vim +++ b/vim/after/ftplugin/text.vim @@ -12,7 +12,9 @@ let b:did_ftplugin_after = 1 let b:undo_ftplugin = b:undo_ftplugin \ . '|unlet b:did_ftplugin_after' -" Spellcheck documents -setlocal spell -let b:undo_ftplugin = b:undo_ftplugin - \ . '|setlocal spell<' +" Spellcheck documents we're actually editing (not just viewing) +if !&readonly + setlocal spell + let b:undo_ftplugin = b:undo_ftplugin + \ . '|setlocal spell<' +endif |