GoLand includes an embedded terminal emulator for working with a command-line shell from inside the IDE. Having a command line right inside the IDE lets you do things like running Git commands, and so on without switching windows and mental focus when you need to perform a quick command line task.
Initially, the terminal emulator runs with your default system shell, but it supports many other shells such as Windows PowerShell, Command Prompt cmd.exe,
csh, and so on.
Open the Terminal tool window
Do one of the following:
Selectfrom the main menu.
Click the Terminal tool window button .
Hover your mouse pointer over in the lower left corner of the IDE, then choose Terminal from the menu.
By default, the terminal emulator runs with the current directory set to the root directory of the current project. You can change the default start directory on the page of GoLand settings Ctrl+Alt+S. If you right-click any file (for example, in the Project tool window or any open tab) and select Open in Terminal, this will run the terminal in the directory of that file.
Start a new session
Click on the toolbar. A new session is opened in a separate tab.
Sessions are saved when you close the project or GoLand, that is, tab names, current working directory, and even the shell history is preserved.
To close an active session, click on the terminal toolbar or right-click the current session tab and select Close Tab from the context menu.
Switch between tabs
Press Alt+Right and Alt+Left to switch the active tab.
Alternatively, you can press Alt+Down to see the list of all terminal tabs.
Rename a tab
Right-click the tab and select Rename Session from the context menu.
Browse the history of entered commands
Use the Up and Down keys.
Configure the terminal emulator
Specify the desired shell to use with the embedded terminal emulator, change the start directory, and define environment variables among other settings.
In case you want to use an alternative shell, here are some example paths you can configure:
Cmder: "cmd" /k ""%CMDER_ROOT%\vendor\init.bat"" (note the
CMDER_ROOTenvironment variable has to be set)
Cygwin: "C:\cygwin\bin\bash.exe" --login -i
Bash: /bin/bash (or bash for Windows: bash.exe)
Optionally, configure the settings that the embedded terminal emulator inherits from the IDE settings.
On thepage, you can configure the copy Ctrl+C and paste Ctrl+V shortcuts.
On the Use block caret is not inherited in the terminal: its caret is always block.page, you can configure caret blinking. The setting
You can configure visual presentation in the terminal on the following pgaes:
: console colors.