I’ve started using Flutter, the mobile SDK for the Dart language.

Dart reminds of Java and JavaScript. It’s quite verbose.

If you have nested functions and classes, it’s hard to find the matching brackets and parentheses. Sometimes the start of a function or class is not on your screen, and it’s hard to get a quick visual overview.

There are plugins that color the brackets differently, for example, Junegunn’s rainbow_parentheses.vim or luochen1990’s rainbow.

But they don’t work well with my existing plugins and color-theme, or they don’t work at all.

A simpler solution is to use Vim’s navigation.

You can easily use the % key to jump to a matching opening or closing parenthesis, bracket or curly brace.

You can also set the option showmatch. The cursor will briefly jump to the matching bracket, wen you insert one.

Further Reading