How can I expand the full path of the current file to pass to a command in Vim? June 7, 2023 by Tarik :!mycommand %:p Related: :!cd %:p:h