aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/markdown.vim20
1 files changed, 16 insertions, 4 deletions
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
index d13bba8f..63f3f062 100644
--- a/vim/after/ftplugin/markdown.vim
+++ b/vim/after/ftplugin/markdown.vim
@@ -3,8 +3,20 @@ if &filetype !=# 'markdown' || v:version < 700
finish
endif
-" Spellcheck documents we're actually editing (not just viewing)
-if has('spell') && &modifiable && !&readonly
- setlocal spell
- let b:undo_ftplugin .= '|setlocal spell<'
+" Spellchecking features
+if has('spell')
+
+ " Spellcheck documents we're actually editing (not just viewing)
+ if &modifiable && !&readonly
+ setlocal spell
+ let b:undo_ftplugin .= '|setlocal spell<'
+ endif
+
+ " Tolerate leading lowercase letters in README.md files, for things like
+ " headings being filenames
+ if expand('%:t') ==# 'README.md'
+ setlocal spellcapcheck=
+ let b:undo_ftplugin .= '|setlocal spellcapcheck<'
+ endif
+
endif