Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete known keywords #13

Open
gradha opened this issue Jul 20, 2013 · 3 comments
Open

Autocomplete known keywords #13

gradha opened this issue Jul 20, 2013 · 3 comments

Comments

@gradha
Copy link

gradha commented Jul 20, 2013

It is weird that vim knows a set of keywords which have to be highlited, but they are not used for autocompletion when pressing Ctrl+P. Is there any vim option to make these keywords available for Ctrl+P?

@zah
Copy link
Owner

zah commented Jul 20, 2013

Hmm, what is bound to your Ctrl+P? Weren't you using the ctrl-p vim plugin?
Depending on how you get your auto-completions, it's possible to achieve what you want in general.

@gradha
Copy link
Author

gradha commented Jul 20, 2013

I don't have any binding in my .vimrc for ctrl+p and the only plugins I'm using are nimrod.vim and syntactic. AFAICS the cltr+p completion behaviour is the standard completion I've been getting for ages on all the platforms I've tried and it is a simple string matching search for keywords existing in the current buffer and maybe those included by #include/#import files in c++/objc.

@zah
Copy link
Owner

zah commented Jul 20, 2013

First of all, I must mention that nimrod.vim is designed to work with neocomplcache, so anyone who stumbles at this thread should consider using it (or refer to the docs for the most up-to-date recommendation).

Now, vanilla vim can be configured to do something similar to what you want by setting the nimrod syntax file as a dictionary for completion. An example is provided here:
http://vim.wikia.com/wiki/Completion_using_a_syntax_file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants