Reputation: 2335
I want to right click on a file in intellij and open the terminal there in mac. I tried 'External Tools' but doesn't open the terminal in the selected directory even though I set $FileDir$ as the working directory of that tool
Upvotes: 26
Views: 20886
Reputation: 624
For me it works this shortcuts by default in Intellij:
WIN: Alt+F12
MACOS: option+fn+F12.
Probably in MACOS you don't pay attention to fn to switch with F12 key
Upvotes: 0
Reputation: 5831
In newer versions of Intellij, this seems to be integrated in the Terminal
plugin, which is available by default.
You can either open a directory with your mouse by:
right click -> Open In -> Terminal
or assign a shortcut to the keymap command Plugins/Terminal/Open in Terminal
.
Since creating a new terminal tab works with command + T, I've assigned command + option + T
Upvotes: 3
Reputation: 20346
Drag and drop a selected folder into the IntelliJ built-in Teminal opens a new terminal session in the built-in Terminal. (As @MariuszWróbel has written.)
There are 2 plugins (as far as I know):
Both the plugins open an external terminal (outside of IntelliJ). Each of them adds some item(s) to the context menu of files and folders:
It opens terminal in the current folder. The plugin works out of the box, no additional settings are required.
It does the same as the previous plus offers opening the terminal in the root folder of the module. The plugin does not work out of the box, you need to configure it as described here.
Linux:
Terminal command: gnome-terminal Options: --working-directory
Windows:
Terminal command: cmd /C start cmd.exe /K Options: cd /D
Windows (with babun or cygwin):
Terminal command: C:<USER-DIRECTORY>.babun\cygwin\bin\mintty.exe Options: -i /Cygwin-Terminal.ico C:<USER-DIRECTORY>.babun\cygwin\bin\bash.exe -l -c "cd \"$0\" ; exec bash"
Mac OS:
Terminal command: open -a Terminal
Upvotes: 26
Reputation: 189
just right click on the project folder that is being open in intelij, and select the option open in terminal
Upvotes: 1
Reputation: 261
You can just easily drag a selected folder and drop into terminal window.
Upvotes: 25