Sunday, July 26, 2015

Buffer name resolution and simplification

When I open a file in the current working directory by specifying
just the relative file name, that short, relative file name appears
in the status line and in the buffer list. When I open another file
in the same directory by specifying the full path name, that full
path name is used in the status line and in the buffer list. Here
is an example using the Vim source directory.

$ cd vim/src
$ vim
:e os_beos.c
:e /usr/local/src/vim-7.4/vim/src/os_unix.c
:ls
1 # "os_beos.c" line 1
2 %a "/usr/local/src/vim-7.4/vim/src/os_unix.c" line 1

If I then change the working directory, Vim resolves/simplifies both
file names to relative path names.

:cd ..
:ls
1 # "src/os_beos.c" line 1
2 %a "src/os_unix.c" line 1

Is there a way to force Vim to always display the file name as a
relative path name, if it can?

The reason I ask is that I open files by a variety of methods so
that the buffer list and the quickfix list wind up with a mixture of
relative and absolute path names. It would make it easier for me to
recognize files that are in the same directory if all the names in
or below the current working directory were shown as relative path
names.

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: