Hacker News new | ask | show | jobs
by k26dr 3376 days ago
This whole time I had no idea vim could autocomplete
1 comments

This is classic "string-based" autocomplete. It completes based on strings it knows about but doesn't take into account the context. I've used for years but yesterday I realized that since Vim version 7 there's a more intelligent kind of autocomplete triggered by C-x C-o that is context-aware. It can complete object methods, HTML tag attribtes, CSS properties, etc. For info:

    :help new-omni-completion
I think it must take into account some level of context because I've noticed that it tends to give me exactly what I want the first time I press it.