Open files using relative paths (if they're shorter than absolute)#82
Open files using relative paths (if they're shorter than absolute)#82jakem72360 wants to merge 3 commits into
Conversation
|
It looks to be a good approach but it did not work for me locally. I got the following error |
|
Out of curiosity, are you using Vim, or Neovim? I haven't tested this with Neovim |
|
neovim, maybe this is why :) |
|
I have a new error now: |
|
@francoiscabrol the easiest workaround I can think of, would be to install GNU coreutils like so; There doesn't seem to be any easy solution from what I can find. It seems the cleanest, most platform-independent method would be to write a recursive function in vimscript to convert absolute paths to relative. For now, I've added a conditional statement to check for the Let me know which approach works best for you |
Files that are selected with ranger are now opened using a path relative to the working directory, rather than an absolute path if the former is shorter. This behaviour produces better tab names since nearby files in a project are likely to be shown relative, whilst files being worked on elsewhere in the system are shown by their absolute path(s). Files in the same directory do not include any path information.