I have a line in my vimrc that enables me to save and run python program in a single click while it's opened:
nnoremap <buffer> <F9> :w <bar> :exec '!python3' shellescape(@%, 1)<cr>
I can also call vim to open a folder in navigation/explorer mode that lets me edit files in that folder. Example:
But when I open a python file in that folder in vim by hitting enter and hit F9 to save and run the file, vim does not go back to the shell (zsh) and display results, which it usually does. How can I fix this?
nnoremapline in your vimrc? In an ftplugin/wrapped in a filetype auto-command? Because you've used
<buffer>, it's only available in the buffer where it's executed... Please use the edit button to add additional details