aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/text.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-02 14:34:04 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-02 14:34:04 +1200
commit682897562b1a1efc1fd993f666a78d5957fc1533 (patch)
tree5581b01edbaa439bc93e57499302cec0dfabc42c /vim/after/ftplugin/text.vim
parentMerge branch 'release/v1.15.0' (diff)
parentRebuild dotfiles(7) manual (diff)
downloaddotfiles-ae4a39ffcbe5c32013deb9dce5a50e1926cc49b9.tar.gz (sig)
dotfiles-ae4a39ffcbe5c32013deb9dce5a50e1926cc49b9.zip
Merge branch 'release/v1.16.0'v1.16.0
* release/v1.16.0: Rebuild dotfiles(7) manual Bump VERSION Update insert_cancel.vim plugin Add vim config subfile to undo Debian's changes Provide install-neovim target Don't shout in CJK in README.md. Don't spellcheck &readonly text/markdown Add 'c' flag to 'formatoptions' for gitcommit Correct <C-L> mapping
Diffstat (limited to 'vim/after/ftplugin/text.vim')
-rw-r--r--vim/after/ftplugin/text.vim10
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