I'm writing as expansion to this blog: How to clear the terminal history from vim? I have this in my vimrc:
autocmd FileType python map <buffer> <F9> :w<CR>:exec '!python3' shellescape(@%, 1)<CR> autocmd FileType python imap <buffer> <F9> <esc>:w<CR>:exec '!python3' shellescape(@%, 1)<CR>
But I don't know where to add clear command in it to clear terminal every time I run it again. I tried do insert it after
<CR> but it doesn't work. Can you help me? Thank you for your suggestions.