In my current vim session, I would like to open a new terminal window and immediately execute the cd command in that terminal to change to a specific directory. I have tried
:terminal cd /home/me/folder
But this does not work, and gives me the message
executing job failed: No such file or directory
How can I do this?
cd
is a builtin shell command. If there's really no direct way to do this I'd probably use a workaround like a custom command:com! -nargs=1 Cdterm lcd <args> | term
. Then:Cdterm somedir
.