Hi,

Vim is capable of highlighting rare words, but because good words have
priority, there is no effect if I mark some good words as rare. People
may want to classify words as rare not only because they are rare, but
also because they are rude or offensive. Sometimes, rare words might
be typed by mistake and, since they are correctly spelled, the mistake
will remain unnoticed. Off course I could simply mark theses words as
bad, but because they are correctly spelled I prefer to flag them as
rare. I have already made the change in my mercurial version of Vim's
source code, which is very convenient for me, but I think it would be
better for most users if rare words have priority over good words.
Currently there is no command to add words as rare (like zg to good
words and zw for bad ones), but we can add them manually to
spell/**.utf-8.add files.

I'm sending the diff generated by mercurial with the proposed changes
for src/spell.c and runtime/doc/spell.txt. I think few users would
note the new default since certainly few people added a list of rare
words for their personal spell dictionaries. However, once Vim is
effectively capable of flagging words as rare, some people may start
to create and publish their lists of rare words.

Thanks,

Jakson Aquino

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff -r aaa953373c91 runtime/doc/spell.txt
--- a/runtime/doc/spell.txt	Thu Jul 29 23:12:43 2010 +0200
+++ b/runtime/doc/spell.txt	Fri Jul 30 08:04:15 2010 -0300
@@ -1160,8 +1160,7 @@
 
 Rare words are highlighted differently from bad words.  This is to be used for
 words that are correct for the language, but are hardly ever used and could be
-a typing mistake anyway.  When the same word is found as good it won't be
-highlighted as rare.
+a typing mistake anyway.
 
 This flag can also be used on an affix, so that a basic word is not rare but
 the basic word plus affix is rare |spell-affix-flags|.  However, if the word
diff -r aaa953373c91 src/spell.c
--- a/src/spell.c	Thu Jul 29 23:12:43 2010 +0200
+++ b/src/spell.c	Fri Jul 30 08:04:15 2010 -0300
@@ -569,8 +569,8 @@
 
 /* Result values.  Lower number is accepted over higher one. */
 #define SP_BANNED	-1
-#define SP_OK		0
-#define SP_RARE		1
+#define SP_RARE		0
+#define SP_OK		1
 #define SP_LOCAL	2
 #define SP_BAD		3
 

Raspunde prin e-mail lui