diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2021-10-16 18:40:57 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2021-10-23 22:30:50 +0200 |
commit | cbec765915a8a76e86ac79dde8eeae663b019882 (patch) | |
tree | 9d626c255ef9e827d3169672a8127995e8289da1 /runtime | |
parent | aa4f0879e35c43b186cf51c50f28847dd2df256c (diff) | |
download | rneovim-cbec765915a8a76e86ac79dde8eeae663b019882.tar.gz rneovim-cbec765915a8a76e86ac79dde8eeae663b019882.tar.bz2 rneovim-cbec765915a8a76e86ac79dde8eeae663b019882.zip |
vim-patch:8.2.3520: cannot define a function for thesaurus completion
Problem: Cannot define a function for thesaurus completion.
Solution: Add 'thesaurusfunc'. (Yegappan Lakshmanan, closes vim/vim#8987,
closes 8950)
https://github.com/vim/vim/commit/160e994d768d03a3c826b58115cde94df8fce607
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/insert.txt | 8 | ||||
-rw-r--r-- | runtime/doc/options.txt | 10 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 1 |
3 files changed, 18 insertions, 1 deletions
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index bfc1c235ea..236537dd09 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -822,6 +822,12 @@ CTRL-X CTRL-T Works as CTRL-X CTRL-K, but in a special way. It uses Other uses include translation between two languages, or grouping API functions by keyword. + If the 'thesaurusfunc' option is set, then the user + specified function is invoked to get the list of + completion matches and the 'thesaurus' option is not + used. See |complete-functions| for an explanation of + how the function is invoked and what it should return. + CTRL-T or CTRL-N Search forward for next matching keyword. This keyword replaces the previous matching keyword. @@ -1032,7 +1038,7 @@ CTRL-X CTRL-Z Stop completion without changing the text. FUNCTIONS FOR FINDING COMPLETIONS *complete-functions* -This applies to 'completefunc' and 'omnifunc'. +This applies to 'completefunc', 'thesaurusfunc' and 'omnifunc'. The function is called in two different ways: - First the function is called to find the start of the text to be completed. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index be397117b2..2a57de466c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6459,6 +6459,16 @@ A jump table for the options with a short description can be found at |Q_op|. uses another default. Backticks cannot be used in this option for security reasons. + *'thesaurusfunc'* *'tsrfu'* +'thesaurusfunc' 'tsrfu' string (default: empty) + local to buffer + This option specifies a function to be used for thesaurus completion + with CTRL-X CTRL-T. |i_CTRL-X_CTRL-T| + See |complete-functions| for an explanation of how the function is + invoked and what it should return. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'tildeop'* *'top'* *'notildeop'* *'notop'* 'tildeop' 'top' boolean (default off) global diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 77e69a3eea..8cabf05053 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -895,6 +895,7 @@ Short explanation of each option: *option-list* 'terse' shorten some messages 'textwidth' 'tw' maximum width of text that is being inserted 'thesaurus' 'tsr' list of thesaurus files for keyword completion +'thesaurusfunc' 'tsrfu' function to be used for thesaurus completion 'tildeop' 'top' tilde command "~" behaves like an operator 'timeout' 'to' time out on mappings and key codes 'timeoutlen' 'tm' time out time in milliseconds |