When I edit file:
/home/me/projects/myproj/src/util.c
I would like to start terminal at:
/home/me/projects/myproj/src.
With Vim version > 8 I can run :terminal but it always starts at folder in which I've opened Vim (which is /home/me/projects/myproj)
How can I do this?
:echo $VIM_DIRoutputs the correct directory, but the command fails :( – Krish Mar 12 '21 at 20:33:terminal<CR>Acd $VIM_DIR<CR>in Neovim atleast, terminal opens up in normal mode, so you get into insert mode first (a/i/A/I) to type in the rest of the command
– Dre Westcook Jan 20 '22 at 03:22command Cdot normal! :lcd%:h<CR>:terminal<CR>A<CR>