Tuesday, September 27, 2011

Re: Vim spellcheck

On 27 September 2011 15:23, Matteo Landi <landimatte@gmail.com> wrote:
> On Tue, Sep 27, 2011 at 1:08 PM, Thomas <wienecke.t@googlemail.com> wrote:
>> Hello vim-users,
>>
>> I've got a problem with the vim spellcheck.
>> If I open a textfile and type
>> :set spell spelllang=de_de
>> everything works as expected.
>> But if I close the file, open it again, vim doesn't know any word
>
> When you "close the file", do you mean you are destroying the buffer,
> or that you are closing the vim session?
>
>> anymore. Everything is marked as wrong.
>
> This suggests me that you are quitting Vim and that you are opening a
> new Vim session, hence I think you need to set the spell language
> again (or put it inside your .vimrc).
Thanks for your answer!

Well, putting "set spell spelllang=de_de" into my .vimrc solved the problem.
Anyway I think the behaviour is kind of strange.
I try to explain it again:
Normally I don't turn on spellchecking, because I think it's annoying
while editing some programming code.
But if I write a letter with latex, I would turn it on, using ':set
spell spelllang=de_de' inside vim and everything works fine.
If I now close vim (:wq) and open the same textfile again, vim
remembers my setting for this file.
:set spelllang
would return "de_de", but everything would be marked as wrong (red).
To fix the problem, I have to ":set nospell", close vim (:wq), open
the file again and type ":set spell" again.

Now with "set spell spelllang=de_de" in my .vimrc the spellchecking is
always correct, but actually I just want to use this feature in a few
text-files.

Greetings,
Thomas

>
> My 2 cents,
> Matteo
>
>>
>> If I
>> :set nospell
>> close the file, open it and then
>> :set spell
>> it works again as expected.
>>
>> What's wrong with vim? Any ideas?
>>
>> Thanks in advance,
>> Thomas
>>
>> --
>> You received this message from the "vim_use" 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
>>
>
>
>
> --
> http://www.matteolandi.net/
>
> --
> You received this message from the "vim_use" 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
>

--
You received this message from the "vim_use" 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

No comments: