Reputation: 21
When I execute :ls
in vim, I see all buffers with full path, except for the file in the active buffer. With long paths and a not so large editor window, the buffer list get wrapped. In this way, searching for a buffer takes a while, especially when you have a lot of buffers open. Is there a possibility to show all buffers without full path?
Upvotes: 2
Views: 663
Reputation: 3351
You can't change the format of :ls
. It shows paths relative to your current working directory (:pwd
).
You can change the current working directory either via :cd
or :lcd
.
Also you might find the option :help 'autochdir'
interesting, too.
EDIT:
I should clarify on relative here:
Files within the current working directory are shown relative and files outside of it are shown absolute. Absolute paths can be shortened, e.g. by using ~
instead of /home/user
on Unix systems.
Upvotes: 2