Neovim for Beginners — Built-in Completion

Grasp the basics of the built-in completion.

alpha2phi
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).

CTRL-D

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

Tab

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…

--

--

alpha2phi
alpha2phi

Written by alpha2phi

Software engineer, Data Science and ML practitioner.

Responses (1)