You are not logged in.

#1 2012-09-02 23:59:35

jamiseeley
Member
Registered: 2012-09-02
Posts: 3

Weird problem in Vim (Disappearing dictionary?)

Hello,

I'm trying to set up Vim with dictionary completion for writing. If I just try dictionary completion, without altering any options, I get lots of words (very thorough dictionary). However, if I try to add a customer dictionary with `set dictionary +=/path/to/my/dict`, the new dictionary is used, but the previous one is now gone.

Normally, when doing completion, the popup menu will list which file the words were taken from. This initial dictionary does not have any files listed, though. Does anyone know where Vim is getting this wordlist? More particularly, how can I KEEP that wordlist while adding custom words?

Thanks,

Jason

Offline

#2 2012-09-03 04:31:53

jfb3
Member
Registered: 2011-08-20
Posts: 68

Re: Weird problem in Vim (Disappearing dictionary?)

What's the result of

:set dictionary

?

Offline

#3 2012-09-04 01:34:04

jamiseeley
Member
Registered: 2012-09-02
Posts: 3

Re: Weird problem in Vim (Disappearing dictionary?)

jfb3 wrote:

What's the result of

:set dictionary

?

dictionary=

And that's it. It's weird, <C-x><C-k> certainly works, with a long list of suggestions. I just don't know where they're all coming from, or why they disappear if I try to add another dictionary on top.

Offline

#4 2012-09-04 20:53:49

jfb3
Member
Registered: 2011-08-20
Posts: 68

Re: Weird problem in Vim (Disappearing dictionary?)

Hmmmm...

What's in your .vimrc ?

What's the result of ":set all"

When you do get a list for completion does it show the file the words are coming from???

Last edited by jfb3 (2012-09-04 20:54:51)

Offline

#5 2012-09-04 22:27:23

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Weird problem in Vim (Disappearing dictionary?)

The default dictionary will be one of the files in '/usr/share/vim/vim73/spell', I'm reasonably sure.

Vim seems to have no dictionary set by default.  From the mangled English of options.txt, by way of ':he dictionary',

When this option [set dictionary=] is empty, or an entry "spell" is present, spell checking is enabled the currently active spelling is used.

I think this means that with no dictionary set, the spellfile is used.

Without a spellfile set, ':he spellfile' says,

...Vim will set it for you: Using the first directory in 'runtimepath' that is writable.  If there is no "spell" directory yet it will be created.  For the file name the first language name that appears in 'spelllang' is used, ignoring the region...

OK we're closer to finding the default dictionary file.  See ':he spell-load' for directions to narrow the possibilities down from this point.

Edit:
Since the dictionary appears to disappear on you, it might be best to set one in your .vimrc.

Last edited by thisoldman (2012-09-04 22:33:49)

Offline

#6 2012-09-05 03:52:14

jamiseeley
Member
Registered: 2012-09-02
Posts: 3

Re: Weird problem in Vim (Disappearing dictionary?)

Yeah, I saw found a message on a mailing list from a few years ago that suggested dictionary completion could use the spellfile when there was no dictionary set. Still odd that there is no obvious way to keep using the spellfile and just add other dictionaries. Oh well, I've decided not to worry about it anymore. I'm just going to use some of the wordlists from Moby, set explicitly, that should be a large enough dictionary. Thanks for the help, anyway.

Offline

Board footer

Powered by FluxBB