考虑尝试dynamic-completion-mode
(标准库completion.el
)。
您可以在不同的动态完成文件之间进行更改,每种语言一个。选项save-completions-file-name
保存文件名,但没有任何说明您不能动态更改其值,例如使用命令,以便在多组完成之间切换。(当然,这样的命令应该先保存到一个文件,然后再切换到另一个文件。)
的“doc”dynamic-completion-mode
在Commentary
librarycompletion.el
中。图书馆很旧,但仍然很有用,恕我直言。摘自Commentary
:
This watches all the words that you type and remembers them. When
typing a new word, pressing "complete" (meta-return) "completes" the
word by inserting the most recently used word that begins with the
same characters. If you press meta-return repeatedly, it cycles
through all the words it knows about.
If you like the completion then just continue typing, it is as if you
entered the text by hand. If you want the inserted extra characters
to go away, type control-w or delete. More options are described below.
The guesses are made in the order of the most recently "used". Typing
in a word and then typing a separator character (such as a space) "uses"
the word. So does moving a cursor over the word. If no words are found,
it uses an extended version of the dabbrev style completion.
(另见冰柱完成dynamic-completion-mode
。)