This is what I am trying to do: I have a .exe program that checks for certain errors in a text file. I want to create a shortcut (like `\+M`) to run the .exe file against the text file. My .exe file's path is C:\Users\xyz\Documents\Checker\manager.exe My text file's path is C:\Users\xyz\Desktop\mytextfile.txt The manager just needs the following command "check [full filepath to the text file]." Here is what I have tried in the VIM plugin file. function! ExecuteManagerCheck(file) execute ':!start cmd /k "C:\Users\xyz\Documents\checker\manager check " g:file' endfunction nmap <leader>m :call ExecuteManagerCheck(expand('%:p')) <cr> Can someone please help me get the full filepath to the current text file open in Vim?