So I have two commands in my .vimxc that I can use to execute the current python file using python 2.whatever. The Shift-e one works fine and waits for me to hit enter to return to vim. The one using F7 does not wait for me to hit enter, but just prints to screen and goes straight back to vim, preventing me from seeing the output unless there is an error. Why do these behave differently and how would I get the F7 bind to wait for me to hit enter like the S-e bind does?
map <buffer> <S-e> :w<CR>:!/usr/bin/env python2 % <CR>
map <buffer> <F7> :w<CR>:!/usr/bin/env python2 % <CR>
Make sure not to have any trailing whitespace after the last
<CR>in either case; it would cause vim to exit the output view immediately.