Hi,

On Sun, Oct 3, 2021 at 3:05 PM MatÄ›j Cepl <[email protected]> wrote:

> Thesaurus is a very useful function for anybody who wants to write a
> longer text. Vim's support for this functionality is rudimentary at best
> and it has plenty of shortcomings. These two
> <https://www.reddit.com/r/vim/comments/m5lawj/more_sensible_vim_thesaurus_matching_using/>
> Reddit posts
> <https://www.reddit.com/r/vim/comments/55y53e/allow_spaces_in_thesaurus_entries/>
> lists some of them (while discussing using Mobby Thesaurus as a source of
> data):
>
>    1.
>
>    mthesaur.txt contains whole phrases as synonyms - eg 'under the
>    weather' for 'down'. Vim then suggests 'under', 'the' and 'weather' as
>    seperate matches.
>    2.
>
>    Because of the way Vim finds auto-complete matches, the suggestions
>    sometimes number upwards of 10,000 making it really unusable.
>    3.
>
>    Vim can't accept lines longer than 512 characters. Since each entry in
>    mthesaur.txt is one line, they can contain many thousands of characters.
>
> There are some Vim plugins which are dealing with some of these problems
> (e.g., https://github.com/Ron89/thesaurus_query.vim,
> https://github.com/reedes/vim-lexical.git), but unfortunately the first
> thing they have to do is to completely ignore built-in thesaurus in vim (
> i_CTRL-X_CTRL-T), because this key combination is hardcoded.
>
> Example of omnifunc, where lively ecosystem of completion engines
> flourishes, and the negative example of both thesaurus and spellchecking,
> which are limited to the limited built-in implementations (I just have to
> mention my old PR #2500 <https://github.com/vim/vim/pull/2500> and yes,
> in the end, it seems to me that the original solution before the built-in
> spellchecker was added could be better if better integrated and/or some
> simple spelling engine was included).
>
> Some of these issues were mentioned in #1611
> <https://github.com/vim/vim/issues/1611> but they were mostly ignored so
> far.
>
> There are some heroic efforts to make the built-in thesaurus working, but
> none of them seem to be able to overcome the problems in the built-in
> implementaiton.
>
>    - Also, https://thesynack.com/posts/vim-thesaurus/
>
> *Describe the solution you'd like*
> Introduce configuration settings thesaurusfunc (and possibly even
> spellsfunc) with the similar syntax to omnifunc, which would allow using
> external engine for thesaurus functionality.
>
>
>
I have added the thesaurusfunc option and the changes are available at
https://github.com/yegappan/vim/tree/thesaurus.
Can you try this and let me know if it works for you?

Thanks,
Yegappan

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7n3jTgZs6%2BMuQYp2zktGEdZmO1Ap-XTL%3DaQzJgTQtFfCA%40mail.gmail.com.

Raspunde prin e-mail lui