OneTerm.nvim icon indicating copy to clipboard operation
OneTerm.nvim copied to clipboard

Reducing absolut path length in fzf match

Open aMOPel opened this issue 3 years ago • 5 comments

/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

aMOPel avatar Apr 16 '21 09:04 aMOPel

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

LoricAndre avatar Apr 16 '21 14:04 LoricAndre

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?

aMOPel avatar Apr 17 '21 09:04 aMOPel

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

LoricAndre avatar Apr 17 '21 10:04 LoricAndre

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

aMOPel avatar Apr 17 '21 10:04 aMOPel

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

LoricAndre avatar Apr 17 '21 10:04 LoricAndre