I use vagrant to run multiple docker based environments to reproduce client environments. PHPSTorm has a built in terminal, which you can right click and start a termical session in the folder of the file. The problem I have is that the terminal session is outside vagrant.
The built in vagrant tools don;t work here as I am in a project folder that exists inside the vagrant file path, so vagrant is OUTSIDE the project
My want is to hop into teh vagrant session when I open teh terminal in PHPStorm.
The solution is quite easy.
Open the PHPStom settings [ctrl+alt+s] then search for terminal (https://www.jetbrains.com/help/phpstorm/terminal-emulator.html)
Now edit the Shell path value and add teh 'vagrant ssh' as an initial command:
/bin/bash -c "vagrant ssh"
Now, when you initiate a terminal it will drop into vagrant.
Unfirtunately this still does not open the shell AT THE FILE LOCATION, which is something else I still need to solve