Displaying the relative path of the currently edited file in Vim's statusline?

Viewed 2068

:help statusline claims %f will render as:

Path to the file in the buffer, as typed or relative to current directory.

When I set statusline=%f, the path in the statusline is sometimes relative, but often absolute.

Is there a way to make sure the path displayed is always relative?

3 Answers
Related