import { op } from "https://deno.land/x/ddc_vim@v3.9.1/deps.ts";
const { mkspellmem } = op;
Parameters for :mkspell
. This tunes when to start compressing the
word tree. Compression can be slow when there are many words, but
it's needed to avoid running out of memory. The amount of memory used
per word depends very much on how similar the words are, that's why
this tuning is complicated.
There are three numbers, separated by commas: {start},{inc},{added}
For most languages the uncompressed word tree fits in memory. {start} gives the amount of memory in Kbyte that can be used before any compression is done. It should be a bit smaller than the amount of memory that is available to Vim.
When going over the {start} limit the {inc} number specifies the amount of memory in Kbyte that can be allocated before another compression is done. A low number means compression is done after less words are added, which is slow. A high number means more memory will be allocated.
After doing compression, {added} times 1024 words can be added before the {inc} limit is ignored and compression is done when any extra amount of memory is needed. A low number means there is a smaller chance of hitting the {inc} limit, less memory is used but it's slower.
The languages for which these numbers are important are Italian and Hungarian. The default works for when you have about 512 Mbyte. If you have 1 Gbyte you could use:
:set mkspellmem=900000,3000,800
If you have less than 512 Mbyte :mkspell
may fail for some
languages, no matter what you set 'mkspellmem' to.
This option cannot be set from a modeline
or in the sandbox
.
(default "460000,2000,500")
not available when compiled without the +syntax
feature