LoricAndre / OneTerm.nvim

One terminal plugin to rule them all ! (eventually)
53 stars 1 forks source link

Reducing absolut path length in fzf match #4

Open aMOPel opened 3 years ago

aMOPel commented 3 years ago

/home/user/work/project/src/file.end

To Either compression of the first few ~/w/p/src/file.end Or a max length ...roject/src/file.end Or some mix, where either is appropriate

LoricAndre commented 3 years ago

Honestly this is a lot of work and I'm not sure I'll do it... Right now I can just take the output from fzf (I still modify it a bit but it's minimal), but by adding that I have to shorten the paths then expanding them afterwards, which means controlling that they are unique and I can already see the next issues... I'm leaving the issue open but I don't think I'll work on it unless there is a real need

aMOPel commented 3 years ago

i mean cant you make a map or 2 parallel arrays or smth, one where you have your nice expanded paths, and one where you have the reduced paths, and you pipe that one into the term and keep the other one, and afterwards you can identify the right expanded path by some id or the array index?

LoricAndre commented 3 years ago

This would require a refactor, right now I'm pretty much just piping the result from fzf into neovim

aMOPel commented 3 years ago

i see, is that why you also dont want to add highlighting to the lines in fzf?

LoricAndre commented 3 years ago

Yes basically, I'll see if I can work on this next week