Problem:
I noticed that my "&packpath" has some duplicates, I want to remove them.
What I have tried:
My viml knowledge is not very strong but I did manage to create a unique "List", but I am not sure how to turn that list back into the correct string without calling "!awk/!sed/!perl", I now think that perhaps there is a simpler "vim" way to do it? my example:
let newpackpath = string(uniq(split(&packpath, ',')))
Returns this string:
['/data/data/com.termux/files/home/conf/nvim',
'/data/data/com.termux/files/home/data/nvim/site',
'/data/data/com.termux/files/usr/share/nvim/runtime',
'/data/data/com.termux/files/usr/lib/nvim',
'/data/data/com.termux/files/home/data/nvim/site/after',
'/data/data/com.termux/files/home/conf/nvim/after']
To be correct, it should look like this instead:
/data/data/com.termux/files/home/conf/nvim,/data/data/com.termux/files/home/data/nvim/site,/data/data/com.termux/files/usr/share/nvim/runtime,/data/data/com.termux/files/usr/lib/nvim,/data/data/com.termux/files/home/data/nvim/site/after,/data/data/com.termux/files/home/conf/nvim/after
I'm now I'm out of my viml-depth! my only knowledge would be to use !awk/!perl/!sed somehow?!
can vim handle this itself???
either way....
How can I dedupe my "&packpath" or "&runtimepath"?
To those who can help, thank you!