Neovim for Beginners — Built-in Completion

Grasp the basics of the built-in completion.

7 min readJan 18, 2022


Neovimf for Beginners — Completion

Completion is a broad topic to cover. We will start with the basics, and continue with completion plugins, LSP (Language Server Protocol) completion, and AI (Artificial Intelligence) completion in later articles.

In this article, we are going to

  • Learn command-line completion
  • Learn insert-mode completion

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

Command-line Completion

When we type : to enter command-line mode, there are common commands that can help us to complete the word before the cursor (:h cmdline-competion).


List names that match the pattern in front of the cursor.


A match is done on the pattern in front of the cursor. The match (if there are several, the first match) is inserted in the place of the pattern.

We can change this command using the wildchar (default to Tab) option. E.g. if we type :set wildchar=<S-c>, now instead of pressing Tab, we need to type Shift + c to get the completion.

Tab Completion using wildchar


By default, pressing Tab selects the first match. Press S-Tab if we want to select the last match.

S-Tab Completion


We can press C-N (next), C-P (previous) to navigate to the next or previous match.

Completion Menu Navigation


When incsearch is set, entering a search pattern for / or ? and the current match is…




Software engineer, Data Science and ML practitioner.