vim: Include search

Tags: til vim

Vim has a bunch of features to search the text in "included" files, for example [I to find all lines containing the current keyword. Those features are controlled via a couple of options that you'll probably have to set to teach vim about your programming language.

The mental model is "check each line to see if it includes another file, and if so, recurse into searching the lines in that file etc.".

Included files are detected via:

You can check your config by the checkpath! command.

Published on: 23 Feb 2026