I am attempting to create a vimrc function that will be used in an autocmd. The function must simply call a python script and pass the file name as an argument.
let filename = expand("%:t")
Sure, you can use the
execute command to execute a string, which is built from the command you want and the variable concatenated together:
fu! Test() let filename = expand("%:t") execute "!test.py " . l:filename endfunction
I've omitted the filename argument in your
Test function because it doesn't seem to be used