In Vim, I often find myself in a situation where I want to fill in the name of a file that I edit in a separate buffer.
Suppose I have two buffers open: foo.cpp and bar.h. In foo.cpp, I need # to include "bar.h". I want to do something like this:
foo.cpp
#include "b<complete filename to bar.h>
According to Vim's documentation, I can use CTRL + x CTRL + f to complete the file, but it seems to rely on Vim having the CWD equivalent for the parent directory bar.h. This is not always possible.
Given that I open bar.h in a separate buffer, is auto-completion possible based on the name of the buffer?
rustushki
source share