Re: spellfile

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: spellfile

Bram Moolenaar

Johnny Blaze wrote:

> First off:
>
> Win32, Latest CVS, MSVC 7.1
> :set runtimepath?
> runtimepath=c:\vim\vimfiles,c:\vim\vim70aa
> :set spelllang?
> spellang=en_us
> :set enc?
> encoding=utf-8
>
> I have created under c:\vim\vimfiles ->
> spell
> +-- en
> +-- en_us
>
> Now:
>
> :set spellfile=personal.utf8.add
> (as is indicated in the docs for spellfile --> "It must end in
> ".{encoding}.add""
> :normal iThis is pyromancer
> :normal zg
>
> Now, I check c:\vim\vimfiles\spell and its sub-folders... no .add
> files, no .spl files... but "personal.utf8.add" and
> "personal.utf8.add.spl" is in c:\vim\vimfiles.
>
> Shouldn't this be placed in $VIMFILES\spell?

You can place the 'spellfile' in the current directory.  That allows for
a per-project word list.  Thus if you want to place it in a specific
directory you need to include the path.

> Also,
>
> :set spellfile=personal.add
> works and creates the files (which is contrary to the docs).

It works, but now you don't know what encoding the file is in.  That's
mostly OK for English, but languages that use non-ASCII characters will
get into trouble when you switch encoding.  The automatic mechanism to
set 'spellfile' will always add the 'encoding' value.

I didn't add a check for 'encoding' to appear, since it isn't always
necessary.  I think the user will know what to do.

> and,
>
> :set spellfile=spell\personal.add
> works and puts it in the $VIMFILES\spell directory

You must be in the $VIMFILES directory then.

--
MAN:     You don't frighten us, English pig-dog!  Go and boil your bottoms,
         son of a silly person.  I blow my nose on you, so-called Arthur-king,
         you and your silly English K...kaniggets.
   He puts hands to his ears and blows a raspberry.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///