I am relatively new to vim and have started using the vim-slime plugin. One thing I use it for is to run python scripts, for example
:SlimeSend1 python ~/myPythonFile.py
I now would like to automate the command above. More specifically, I would like to map the command above to a keystroke, but for whatever python file I happen to be working with. Using F5 as my example keystroke, I am looking for something like
:map <F5> SlimeSend1 python expand('%:p')<CR>
The command above doesn't work because it sends the literal string "python expand('%:p')". As a note, I have gone through vim-slime's documentation, but still can't figure this out.