aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-06-04 00:42:47 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-06-04 00:42:47 +1200
commit3bc46f740721436993c3024179ef925f040dec9d (patch)
tree9af5508b2ca600aab69fe255303acf6eb6d89b47
parentAdd an idea (diff)
downloaddotfiles-3bc46f740721436993c3024179ef925f040dec9d.tar.gz
dotfiles-3bc46f740721436993c3024179ef925f040dec9d.zip
Prevent Vim spell checking of code blocks in mail
-rw-r--r--IDEAS.md2
-rw-r--r--vim/after/syntax/mail.vim3
2 files changed, 3 insertions, 2 deletions
diff --git a/IDEAS.md b/IDEAS.md
index d4e573d5..7391b836 100644
--- a/IDEAS.md
+++ b/IDEAS.md
@@ -30,5 +30,3 @@ Ideas
* I'd like a Git hook that pre-fills out "Version X.Y.Z" if making an annotated
tag named `vX.Y.Z`.
* There's no reason to limit `digraph_search.vim` to insert mode only
-* Would be good to avoid spell-checking in block code for ft=mail, maybe
- imitating however ft=markdown is doing it
diff --git a/vim/after/syntax/mail.vim b/vim/after/syntax/mail.vim
new file mode 100644
index 00000000..77c76f00
--- /dev/null
+++ b/vim/after/syntax/mail.vim
@@ -0,0 +1,3 @@
+" Don't spellcheck code in mail messages
+syntax region mailCode start='`' end='`' keepend contains=@NoSpell
+syntax region mailCodeBlock start=' \{4\}' end='$' contains=@NoSpell