aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/gitcommit.vim2
-rw-r--r--vim/after/ftplugin/markdown.vim10
-rw-r--r--vim/after/ftplugin/text.vim10
3 files changed, 13 insertions, 9 deletions
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index 761ebc81..b7538c9c 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -14,6 +14,6 @@ let b:undo_ftplugin = b:undo_ftplugin
" Make angle brackets behave like mail quotes
setlocal comments+=n:>
-setlocal formatoptions+=or
+setlocal formatoptions+=cor
let b:undo_ftplugin = b:undo_ftplugin
\ . '|setlocal comments< formatoptions<'
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
index 29d13c71..7ec37c64 100644
--- a/vim/after/ftplugin/markdown.vim
+++ b/vim/after/ftplugin/markdown.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
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