On Thu, 15 Nov 2012 03:20:53 +0800, glts wrote:
Hi
For example, I have a string "foo", I want to get its completion
candidates like doing i_ctrl-x_ctrl-k after word "foo", but I don't want
to do this by hand, I want to get the candidate list and use it in
vimscript.
There is no Vim script function to extract the lines from the popup
menu.
However, as you realize, Ctrl-X Ctrl-K in insert mode gets its data from
the files specified with the 'dictionary' option. You could extract your
data directly from those files, couldn't you?
Or, if the 'dictionary' option is empty, then the completion data comes
from the spell files for the current spelling language. Again you could
try to get your data directly from the spell files.
That's all I've got. Maybe somebody else has a better idea ...
Thanks glts, it's a way, but if the file is large, the speed of reading a
file and extracting it would be very slow, that's why I'm searching a way
to get the result from vim dictionary feature.
--
Regards,
WU Yue
State Key laboratory of Natural Products and Functions
Key Laboratory of Modern Chinese Medicines
Department of Traditional Chinese Medicine
China Pharmaceutical University
No.24, Tongjia Xiang Street, Nanjing 210009, China
--
You received this message from the "vim_use" 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