Neovim 101 — Regular Expression

Tips and tricks for Vim regular expression.

alpha2phi
3 min readSep 10, 2022
Neovim 101 — Regular Expression

Vim regular expression is powerful but could be challenging for beginners to learn. In this article, we go through several tricks to help us use Vim regular expression.

This article is part of the Neovim 101 series.

The Neovim configuration files are available in this repository.

Getting Started

We will not go through the basics of Vim regular expression. From the Vim documentation, we would suggest reading the followings.

usr_27.txt
  • The definition of a pattern (:h regexp)
  • Patterns and search commands (:h pattern-searches)
  • Substitute (:h :substitute)

incsearch and hlsearch

hlsearch and incsearch are global parameters that highlight all matches as we type. They are on by default in Neovim.

--

--