O'Reilly logo

Mastering Vim by Ruslan Osipov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Built-in autocomplete

Vim supports native autocomplete based on words available in open buffers. It's available out of the box starting with Vim 7.0. Start by typing the beginning of a function name and hit Ctrl + n to bring up the autocomplete list. You can navigate the list using Ctrl + n and Ctrl + p. For example, open animal_farm.py, enter insert mode, and start typing the first two letters of a function name: ma (make_animal). Press Ctrl + n. This will bring up a list of available options:

Continue typing to dismiss the list.

In fact, Vim has an insert-completion mode, which supports multiple completion types. Press Ctrl + followed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required