I just learned of the existence of include-search, but even after reading :help include-searchand :help includeexpr I'm not sure what I need to do to have [I find included and required files.How do I configure include-search for both included and required PHP files?I think I need to set includeexpr such that it allow searching files whether they were included using require, require_once, include, or include_once; but I'm not sure. And I don't quite get what the variable is supposed to have.
Configuring include-search for PHP
vimrc;search;include;filetype php
The default php ftplugin already does that for you:setlocal include=\\\(require\\\|include\\\)\\\(_once\\\)\\\?Add filetype plugin indent on to your ~/.vimrc if it's not already there to benefit from Vim's filetype detection.