This may seem a little nit-picky, but I like using the wildmenu to switch between buffers: I do :b and then hit tab until I get to the file I want. The problem is that sometimes, vim shows the entire file path instead of just the file. So instead of getting something nice like
foo.cpp bar.cpp foobar.cpp
I get
foo.cpp ~/Documents/programming/projects/my_project/src/bar.cpp foobar.cpp
Which ANNOYS THE HELL out of me. Sometimes it happens, sometimes it doesn't. Deleting the buffer and reopening the file doesn't do anything; I have to restart vim in order for it to go away.
Does anyone know why vim does this?
EDIT: So, I haven't experienced this problem since I last created this post; however, just now the problem happened again, and I now know the situation in which it manifests. The situation is as follows:
I use the 'quickfix' window for viewing compile errors. When I build my project (via :make
) and there are errors, if the files that contain the errors are not currently buffered within vim, then the absolute path of the file is shown in the quickfix window and everywhere else for the rest of the vim session; even if I do :edit foo.cpp
after the :make
, it will still show the full path for the buffer.
Deleting the buffer and doing another :edit
doesn't fix it; vim shows the full path no matter what. The only remedy is to kill vim, open a new process, and to open the files containing the errors before calling :make
.
Very strange. Any ideas?
~/blah/something
but:pwd
outputs/Users/me/blah
– maybe some plugin code doesn't 'realize' that they're equivalent?