In Vim, to get the full path of the current file’s directory, you can use the following command:
Command:
:echo expand(‘%:p:h’)
Explanation:
expand(‘%:p:h’):
% refers to the current file.
:p gives the full path of the file.
:h gets the directory part of that full path (removes the filename).
This command will display the full directory path of the file currently open in Vim.