Simple autosuggestions in Vim

When it comes to Vim, I like to keep things as simple as possible. That is achieved by using built-in functionality, and occasionally, by writing one or two lines of vimscript instead of having to use a plugin.

I was looking for a vim plugin that can automatically suggest completions as I type, instead of having to press Ctrl + n all the time. Turns out that the existing plugins tend to do too much, and have too many configuration options. Did you know that Vim comes with built-in support for completing a number of programming languages (PHP, Python, etc.) in addition to its usual completions? Well if Vim has those built-in capabilities, why not make use of them? Then the only thing left is to automate the Ctrl + n presses, so that suggestions happen as you type.

There are a number of plugins that do this. One that I'm using now is vim-mucomplete. A huge advantage of taking advantage of Vim's built-in completion is the speed. There is no noticeable lag. I love simplicity!