3

I open vim with vim -u NONE <filename>, so this ensures that the error is not due to vimrc or plugins. I use checkpath! to dump all files which are present in the path.

:set path?
path=.,/usr/include,,,~/main

:checkpath!
No files included

:set path=~/main/**
path=~/main/**

:checkpath!
No files included
$ ls -lR ~/main | wc -l
459590

Any suggestions to find why vim can't find the files in the path.

5

I think you’ve misunderstood 'path'. The path option determines which directories are searched for included files.

But what files are included are determined by the options include, suffixesadd, and includeexpr. These are used in combination to detect that the current file includes/imports some other filename; then that filename is searched for in the directories of path.

The :find command works directly based on path, but :isearch, related commands, and :checkpath require the include options to be set appropriately, and additionally they work based on what’s included in the current file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.