Skip to content

Loading…

When spell check is enabled, should apply only to comments #10

Closed
kotarak opened this Issue · 1 comment

2 participants

@kotarak

Created on behalf of Nick Barkas:

I usually have spell checking enabled in vim, and it looks like vim will try to spell check the whole file (I'm using vim 7.3
on OS X). This doesn't look too nice if you have all kinds of keywords and such that aren't real words in your human
language of choice getting highlighted for being misspelled. I've attached a tiny patch to vimclojure's syntax
highlighting file that should fix this for users who have spell check on, so it will only apply to comments.

Edit: I'm too stupid to attach a patch. So here it is inline:

diff -r 22bbb523b401 vim/syntax/clojure.vim
--- a/vim/syntax/clojure.vim    Fri Sep 21 00:07:28 2012 +0200
+++ b/vim/syntax/clojure.vim    Sat Jan 05 00:32:37 2013 -0500
@@ -180,7 +180,7 @@
 syn cluster clojureTopCluster    contains=@clojureAtomCluster,clojureComment,clojureSexp,clojureAnonFn,clojureVector,clojureMap,clojureSet

 syn keyword clojureTodo contained FIXME XXX TODO FIXME: XXX: TODO:
-syn match   clojureComment contains=clojureTodo ";.*$"
+syn match   clojureComment contains=clojureTodo,@Spell ";.*$"

 syn match   clojureKeyword "\c:\{1,2}[a-z0-9?!\-_+*.=<>#$]\+\(/[a-z0-9?!\-_+*.=<>#$]\+\)\?"
@guns guns added a commit that closed this issue
Nick Barkas Restrict spellcheck to comments
Closes #10.
24110ac
@guns guns closed this in 24110ac
@guns
Owner

Thanks Meikel!

Nick, if you're reading this, thank you. I added @NoSpell to the top
syntax cluster to make it work when using rainbow parens as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.