For example, I have below content in a buffer 2,


when I tried :lgetbuffer 2 and :lopen to open location list, it looks like

|| /works/a.txt
|| /works/b.c
|| /works/c.java

And pressing enter on the first item does not help me open /works/a.txt.

  • Just FYI, you may get better coverage on this question on the official vi/vim SE: vi.stackexchange.com – Patrick Jun 16 '17 at 13:11

I figured out of this, post my own answer here for others who has same requirement.

Every line in the buffer needs to be:


So if the buffer looks like below, it will be fine.


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.