Say I have a nnoremap and I want to pass the path of parent directory of current file to it, so the command can use this information. I have read this answer: How can I see the full path of the current file? but Still don't know how to do it?
I just found that % almost do the job, but it returns path to current file.
expand()when you need this in a context where it is not automatically expanded – D. Ben Knoble Apr 02 '21 at 21:23