I'm trying to execute simple commands in the vim terminal mode, but cannot get it to work. For example, I tried
nmap <F12> :let $VIM_DIR=expand('%:p:h')<CR>:terminal<CR>cd $VIM_DIR<CR>
to open a terminal in the directory of the current file, but the final <CR>
is ignored. I also tried term_sendkeys("","\<CR>")
but that didn't have any noticeable effect at all.